WebFaction
Community site: login faq

I am serving up static content using a static / static only (no .htaccess) app.

Now I want to be able to gzip compress it. I am specifically looking at TinyMce: http://www.tinymce.com/wiki.php/Compressors:PHP

This involves putting two extra files into my directory:

tiny_mce_gzip.js

tiny_mce_gzip.php

Does this mean that I should instead be using a Static/CGI/PHP app? (Or maybe there is some other tinyMCE trick?)

And, what about my others files (js, css)? Will they be as fast if they are handled from a Static/CGI/PHP app? I'd hate to have two apps to serve up my static content.

I have set expires max as extra info. How would I achieve this with a Static/CGI/PHP app, if that's what I need to use?

asked 17 Jan '13, 10:01

tpip
4121521
accept rate: 0%


The best solution would be to have the PHP script in a Static/CGI/PHP app, and the static resources (JS, CSS, images, etc) in a static-only app. I know you said "I'd hate to have two apps to serve up my static content", but a PHP script is not static content.

If that's not possible, then use a Static/CGI/PHP app. If you want to control caching for a Static/CGI/PHP app, you can use caching directives in .htaccess. Here's a good example: How to leverage browser caching using .htaccess

Initial page loads might be a bit slower in this configuration, but they'll be just as fast as a static-only app on subsequent page loads, thanks to the caching.

permanent link

answered 18 Jan '13, 10:30

seanf
12.2k42136
accept rate: 37%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×125
×9

question asked: 17 Jan '13, 10:01

question was seen: 3,321 times

last updated: 18 Jan '13, 10:30

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM