Jump to content
Larry Ullman's Book Forums

Recommended Posts

Hi,

 

I've been using this rule in my .htaccess

 

<IfModule mod_deflate.c>

<FilesMatch "\.(js|css)$">

SetOutputFilter DEFLATE

</FilesMatch>

</IfModule>

 

But It doesn't seem to compress my files. I've diabled the cache to check my site performace but it always say i need to compress my files. I've been fiddling with this for hours, but nothiong seems to actually compress my js + css.

 

Would anyone know why?

Link to comment
Share on other sites

Hi Larry,

 

Thanks for getting back to me. To confirm it was regarding my .js and .css in a .html file. I was using yslow to see how a page i'd written performs. I too chose to disable the etags and then used the above code to compress my files. However:

 

I've just receieved an email form my host. In which they state that they don't enable any kind of apache compression. So it wasn't me (neccessarily). I know I can parse them through php but it was more of a test with my nemesis APACHE! then anything.

 

However I do have another question, you mention that you compress your .php files, how do you do this and subsquently display them on your servers?

 

I'm a little unsure?

Link to comment
Share on other sites

Compression of PHP scripts is something built into PHP (and enabled or not enabled, depending upon the host).

 

If you're looking to optimize, you may want to consider applying Smush.It to your images. You'll see this linked as part of YSlow!

Link to comment
Share on other sites

 Share

×
×
  • Create New...