2 ms·
Couldn't you just gzip the HTML and serve it directly to the browser?
by whyever 10y ago
Couldn't you just gzip the HTML and serve it directly to the browser?
- mmstick 10y agoThe HTML pages are generated dynamically from content in my database, in the same manner that Wordpress works. Once a page for a URL has been generated, it is indeed gzipped with zopfli and stored in a concurrent hash map so that future requests for the same content will serve the already-compressed content. If the timestamp has expired and a user requests expired content, only then will that page be re-generated, re-compressed and updated. Without this, I would have to re-generate and re-compress the content each time I get a request.