Make compressed site friendly for hosted static sites.
yikerman opened this issue · 5 comments
Is your feature request related to a problem? Please describe.
One of the benefits of static sites is it can be served through static site hosting providers. However when it comes to gzip compressed sites the wiki redirects the .json
to .json.gz
with a Content-Encoding:gzip
http header. However not every (little) hosting providers have this kind of functionality.
Describe the solution you'd like
Instead of the full server side method, the client can have an idea about whether the site is compressed and fetch the gzips automatically.
This is (to my knowledge) not feasible:
If the server doesn't send the Content-Encoding: gzip
header, then the browser doesn't do the decompressing natively. Which would mean that the web-app needs to manually decompress the tiles through JavaScript. Which (i tried, and) is incredible slow.
What about pako? The benchmark indicates it’s only about 3 times slower than zlib itself.
I am not sure what i tried before, and if i tired it with pako .. i can put this somewhere in the TODO, but testing this will be very low prio. And will probably not happen in the near future (unless someone else PRs it)