Re:Show HN: Make your site’s pages instant in one minute
by aruggirello on Sunday February 10, 2019 @06:33AM
(#19127398)
Perhaps the author could add a script parameter, or support an optional 'preload-cache-for' attribute, so you'd write <a preload-cache-for="300s" ...>
If you really care about speed anyway, you should already have setup your site to max out caching opportunities (Etag, Last-modified, and replying "not-modified" to "if-modified-since" queries) - I'd suggest the author should ensure the script does support caching to the broadest extent possible - hitting your site whenever appropriate.
Re:Show HN: Make your site’s pages instant in one minute
by dharmab on Sunday February 10, 2019 @03:11PM
(#19129707)
Cache-Control headers already do a better job of solving that problem https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Ca...
Re:Show HN: Make your site’s pages instant in one minute
by ajsharp on Sunday February 10, 2019 @10:11AM
(#19128057)
Set your http cache headers correctly to instruct the client to save and re-use pages it downloads.
Re:Show HN: Make your site’s pages instant in one minute
by WestCoastJustin on Sunday February 10, 2019 @12:11PM
(#19128654)
Yeah, this is likely something I need to look into. Since the site changes quite a bit for, non-logged vs logged, I'm not really doing much html caching right now. I'll check that out though. Even if I added something like 30 second cache TTL that might work. I'd have to see if that is even possible and test though. Maybe force an update on login? I'm not a html cache pro so I'd need to see what the options are and then do some testing. For now, it was just fast enough / not worth the time, to do anything other than a fresh page for each request. But, this is a good suggestion. Thanks.
ps. I do tons of caching for any images and videos though. I know those things never change so have weeks of caching enabled.
Re:Show HN: Make your site’s pages instant in one minute
by threatofrain on Sunday February 10, 2019 @04:47AM
(#19127094)
But how do you know it's still fresh?
I'd expect this preload script to remember the pages it's already fetched and not duplicate work unnecessarily. :/