![]() |
Fuck browser caching
I despise browser caching. Trying to debug a program but stupid browser and or stupid server is still throwing errors because the js file its using is an old, cached one.
|
Quote:
|
can't you just clear your cache or am I missing something?
|
Or add something like file.js?version=2 this way you can be 100% sure you and your users grab a fresh copy.
|
In Chrome, open developer tools, go to Network tab, check 'disable cache', refresh page.
|
Shift+F5
|
Quote:
|
No this time its different. This is the clients server that is caching, and the file its caching is a .js file. What's extra frustrating about this is that it took forever to realize it.
|
Quote:
|
do you have access to the server? I would just add a version number to the filename. Hopefully they coded their site so that the filename doesn't have to be changed in every single template
but who the fuck is caching javascript server-side? I struggle to imagine a situation where that would ever make sense |
Most likely it's a load-balanced server, try getting the direct IP into your hosts file to debug quicker
|
Quote:
it's part of why I'm in the habit of bumping the filename every time I update static resources, I just code my sites so there's only one file that references the actual resource URL and every other template includes the "common includes" template or whatever there's a saying that there's only 2 hard problems in computer science: naming and cache invalidation. I mostly name my variables things like "fuck_you" and "your_mom_is_a_whore" so I'm not particularly opinionated as to the difficulty of naming things but when it comes to cache invalidation god DAMN I run into some tough issues |
All times are GMT -7. The time now is 12:32 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123