4 ms·
Startup Tip: Save bandwidth with Gzip (Eg: YC News can save upto 80% per page)
The Gzip module compresses the HTML as it sends it out. It is compatible with all major web servers and all web browsers. Using Gzip can save HUGE amounts of bandwidth, and increase the overall performance of the webserver.
- abstractbill 19y agoDoes anyone know if Hunchentoot can be made to do compression?
- ryantmulligan 19y agocurrently this page is scoring an 82 on YSlow. Needs to make use of a CDN. Needs to add expires headers to external resources, and Needs to Configure ETags.
- deleted 19y ago[deleted]
- inklesspen 19y agoReally, what does YC need a CDN _for_? Just because YSlow says it doesn't mean it's actually a sane idea. They also say to turn off ETags, when what's actually good advice is to set up ETags in such a way that it works.
- staunch 19y agoI'm a big advocate of gzipping the web. People should be aware that enabling gzip can cause some differences with page rendering due to the extra decompression step. It also increases CPU load on the server. There can be other minor issues too. No show-stoppers though. Also, the percentage of compression savings should not be confused with the savings in load time. An 80% reduction in the size of the response does not mean an automatic 80% reduction in page load time.
- prakash 19y agoLoad on the CPU isn't that big of deal, when compared to the benefits. 1. By sending lesser data over the wire, you save on the number of round trips, thereby the page renders faster on the browser 2. the other one is the savings in bandwidth
- prakash 19y agogood point. PG: any particular reason you have not turned on compression? Is to get benefits of chunking?
- pg 19y agoHow do you propose I turn on compression?
- nreece 19y agoWhat web server do you run? (Apache on *nix Or IIS on Windows)
- pg 19y agothis one: (def serve ((o port 8080)) (nil! quitsrv*) (ensure-dir logdir*) (let s (open-socket port) (prn "ready to serve port " port) (flushout) (= currsock* s) (after (while (no quitsrv*) (if breaksrv* (handle-request s) (errsafe (handle-request s)))) (close s) (prn "quit server"))))
- jsjenkins168 19y agoApache just got owned.
- staunch 19y agoPerlbal (or something else) proxying requests would be a quick way to add support. Probably not worth the hassle on news.yc. No pages are that big and I doubt bandwidth usage is killing you.
- nreece 19y agoycombinator.com seems to be running Apache/2.2.4 on FreeBSD ( http://uptime.netcraft.com/up/graph?site=www.ycombinator.com http://uptime.netcraft.com/up/graph?site=www.ycombinator.com ), in which case your best option is using the mod_gzip module: http://www.schroepl.net/projekte/mod_gzip/ http://www.schroepl.net/projekte/mod_gzip/