views:

163

answers:

2

i want to apply gzip compression on my site , all my site is in html and

i have following limitations

  1. hosting server is windows 2003 server.
  2. i can upload files, but i can't modify IIS (as most if users just having hosting account)
  3. i can't modify the .html files to .php as i have too many pages in html, changing file extension is big job to change links in each page.

i want to apply gzip compression on all html files and css files.

i believe there must be other way.

Thanks

+1  A: 

If you cannot modify IIS and cannot be bothered to change your files to PHP to use output buffering, then the answer is you cannot GZip them. Hint: sed find and mv are your friend, as is your IDE's Search/Replace function.

Gordon
Dear Gordonas you know that if you purchase web hosting from any company online, they did't give you access to IIS.Second, my project is in HTML and 105 html of pages interlined with each other, tell me is this easy to convert into PHP and chnage links from each and every page.and i want to use GZIP.and i don't know any one (SED etc)...
air
*Easy?* Yes. *Tedious?* Sure, if you do it by hand. That is why I pointed you to sed, find, mv and your IDE's Search/Replace function. Batch changing file extensions via the shell is a one liner, as is changing the extensions of all links inside these files. The only thing that could be *somewhat* difficult is inserting the output buffering code.
Gordon
105 whole pages! My word! Editing those could take a day!
Paul D. Waite
A: 

Not entirely sure if this would work, but you could:

  1. Download all the files to your computer (if they’re not there already)
  2. Use the command line program gzip to gzip each file individually, leaving their names the same.
  3. Upload them to the server again.

IIS might be clever enough to notice that they’re gzipped, and serve them with the correct HTTP headers. But of course, it might not.

It’s probably a good idea to ask your hosting company how you can serve your files with gzip compression on the hosting plan you’re on.

Paul D. Waite