Closed matty256 closed 6 years ago
Shall we do compression whilst here? Should be straight forward but I don't have much experience as to whether its a good idea or not
This is great, I'm seeing load times reduce form ~10s to < 2s 👍
Compression yes! If the request headers indicate the client supports gzip, we should compress the response, that will make a big difference to decrease initial page load time. Unfortunately I don't know scala/http4s and had no luck finding an example to follow.
No worries, I can have a go at that. Thanks for the PR!
Just thinking, shouldn't we use etags here?
Gzip added in #71
Thanks Toby for adding Gzip!
When I worked on web projects 10 years ago, I targeted the simplest solution for the majority of browsers, i.e. simple cache control headers for static files. However, today all browsers should correctly support etags. If it only requires enabling a feature in the http server to generate and honor etags, I don't see why not. :)
Matt
-- Matt
On Tue, May 15, 2018 at 10:44 AM, Toby notifications@github.com wrote:
Gzip added in #71 https://github.com/tobyweston/temperature-machine/issues/71
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tobyweston/temperature-machine/pull/61#issuecomment-389234794, or mute the thread https://github.com/notifications/unsubscribe-auth/AjEUZRp-18cGAaXQR46ISehP4P_U9lV4ks5tywYFgaJpZM4SW7x8 .
To minimize clients downloading large static css/js files.