Closed huonw closed 10 years ago
Some quick comparison:
$ curl -s http://static.rust-lang.org/doc/master/std/search-index.js | wc -c
501867
$ curl -s http://static.rust-lang.org/doc/master/std/search-index.js | gzip -c -9 - | wc -c
84310
We can also consider adjusting the index format to exploit deflate/LZ77 algorithms if we want to optimize that further. (Unlikely, but just a possibility)
It appears that gzipping manually may be the only way to do this: http://stackoverflow.com/a/5447158/1256624
:(
http://www.nomitor.com/blog/2010/11/10/gzip-support-for-amazon-web-services-cloudfront/ is linked there with a sane workaround
Doesn't seem like rust-lang.org is using cloudfront, but rather just hosts on S3? In which case, that may not work.
The best solution might be the answer further down, since it won't break on safari and mobile browsers and such.
Closing, this is now done through the new official domain, http://doc.rust-lang.org/
Our search doc indexes are huge JS files, which are very amenable to compression.
We're failing pagespeed because of it: http://developers.google.com/speed/pagespeed/insights/?url=http%3A%2F%2Fstatic.rust-lang.org%2Fdoc%2Fmaster%2Fstd%2Findex.html