DEV Community

Discussion on: SPAs: Have Your Cache And Eat It Too

Collapse
 
sherlock1982 profile image
Nikolai Orekhov • Edited

I don't really get why to use "no-store" even. You can use "no-cache" and it will have forced revalidation on each request returning 304 most of the time if your index.html was not changed.
It also applies to any static files that doesn't have a "hashed" names for various reasons.

Thread Thread
 
chipit24 profile image
Robert Komaromi • Edited

I agree, no need to use no-store here as long as your server implements validation via etag or last-modified. Dev.to, for example, sets the following headers:

cache-control: public, no-cache
etag: W/"495a374b731c7d2a6d8758814988907f"
Enter fullscreen mode Exit fullscreen mode