Forum Moderators: phranque

Message Too Old, No Replies

using mod_gzip to compress .js files

         

mgm_03

2:09 pm on Jun 24, 2005 (gmt 0)

10+ Year Member



Disclaimer : I'm comfortable using php but have only a superficial understanding of Apache.

The webserver that my site is on has the mod_gzip module enabled. I've add this line of code : ob_start("ob_gzhandler"); to a page that I want compressed.

It does help. However, on some pages I load a large, external javascript file. I do not know if this .js file (32K) is being compressed.

Does the link to the .js file need to be in the <head> section in order to be encoded?

Is it possible that the mod_gzip is not configured to compress .js files or is that highly unlikely?

TIA

jdMorgan

8:57 pm on Jul 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can use the server headers checker [webmasterworld.com] to examine the MIME-type of your JS file to determine if it is being compressed. I suspect not, but reducing the number of open questions will help.

Jim