News for hackers. Stuff that matters.
Re:The myth that you can’t build interactive web apps except... by wmfiv on Sunday November 17, 2024 @02:21PM (#42166335)
This has been the common/best practice for so long I don't understand why TFA is proposing something different.
Re:The myth that you can’t build interactive web apps except... by youngtaff on Monday November 18, 2024 @04:32AM (#42170996)
Cache control directives indicate how long a browser, proxy etc can store a resource for… they don’t guarantee they will store it for that long though

Control over Service Workers cache lifetime is more explicit

I’d still specify ‘good’ cache lifetimes though

Re:The myth that you can’t build interactive web apps except... by wmfiv on Monday November 18, 2024 @10:29AM (#42173250)
Makes sense as a theoretical problem. Have you ever seen data that suggests it's a practical problem? Seems like one could identify "should be cached forever but wasn't" using etag data in logs.
Re:The myth that you can’t build interactive web apps except... by youngtaff on Monday November 18, 2024 @02:35PM (#42176049)
Facebook did a study about ten years or so back where they placed an image in the browser cache and then they checked how long it was available for… for something like 50% of users it had been evicted within 12hrs

If one of the most popular sites on the web couldn’t keep a resource in cache for long then most other sites have no hope, and that’s before we consider that more people are on mobile these days and so have smaller browser caches than on desktop

Re:The myth that you can’t build interactive web apps except... by jeeeb on Monday November 18, 2024 @05:11PM (#42177674)
From the discussion above it seems that browsers have changed their behaviour in the last 10 years based on that study.

See: https://news.ycombinator.com/item?id=42166914

Re:The myth that you can’t build interactive web apps except... by youngtaff on Tuesday November 19, 2024 @01:27PM (#42186625)
Browsers have finite cache sizes… once they’re full the only way to make space to cache more is to evict something even if that entry is marked as immutable or cacheable for ten years