Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@C0D4 Use dynamic packaging of css/js. It will keep cache if you don’t edit any of files. It will generate a new link if you change one of underlying files.
PROS :
Once in place you can forget about any cache problem
CONS :
Your webapp will be slower to startup (cold-boot). After that it’s faster than before.
If there is an error, some packagers will scream death and refuse to output any css/js -
@NoToJavaScript the issue is when it caches the old html page it was included in and a few refreshes dont work.
-
C0D4681385y@NoToJavaScript yes, where I can control the cache, I implement e-tag and dynamic links based on modified times for resources that are likely to change (custom css, js) while leaving packages alone. This works well.
However when you don't control the cache... looking at you Salesforce... this isn't always possible. -
@Codex404 Ah. HTML ;p
I don’t have a good option. For our pages directly loaded, it seams to never be a problem (I should check if I din’t disabled the cache like 4 years ago)
For dynamic HTML, we manually append ?v=timestamp lol. (Well, not manually/manually, but you see what I mean) -
@C0D4
I just checked....
I’m laughing soso much.
The ONLY thing what is cached is… The dynamic packaging on js/css
All CDN libs (jquery and co) : No cache
All pages : no cache
OMG, nobody saw it in 3-4 years.
Well, I know what I’m fixing tomorrow -
@C0D4 Well, to be fair,, load times are still under 0.5 sec, so may be that's why no one cares
-
There are 2 hard problems in computer science: cache invalidation, naming things, and off-by-1 errors.
Cache, why is it always the cache ;_;
rant