The user, when he clicks a link, needs to get my compressed html file that his browser will uncompress automatically, without any fuss. What must I do on the server side to accomplish this?
Thanks!
-- ben
The user, when he clicks a link, needs to get my compressed html file that his browser will uncompress automatically, without any fuss. What must I do on the server side to accomplish this?
Thanks!
-- ben
What server are you running?
If you have Apache, you can set up mod_deflate
I see now from your comment that you're literally trying to get compressed file to open transparently in a browser, not just compress the whole HTTP response.
That is definitely an issue for ServerFault. It relies on two things:
(Original answer below)
I almost said this belongs on Server Fault, but I think the answer is needed on SO because it's not obvious it belongs on SF unless you understand the mechanisms at work, so:
In most cases, compressing HTTP responses is a capability of web servers, and you or your sysadmin will need to configure the web server (e.g. Apache with mod_deflate) to use that capability.
In the event that your application is its own web server, you need to review RFC 2616 (the HTTP/1.1 spec) and/or the documentation for any framework you're using.
I'm not exactly sure what the right thing is if you're using the webserver like as a reverse proxy... Probably still needs to be in the webserver, if it's possible at all.