miscellaneous

Forum > Miscellaneous > logos and cache
Reply To Thread (login)
Diamond Danielle [55]
2012-04-12 12:52:58
[12 years, 229 days ago]

so i guess that logos don't update if cache is not cleared. had a new logo put on my bot and saw that the old one was still showing, cleared cache and bingo, now the new one is there.


 
Made2shred [72]
2012-04-12 13:42:08
[12 years, 229 days ago]

yeah that's about right, depends on the browser and how frequently it updates. also you should be able to set it so it doesnt cache star images (may require a userscript or some minor tweaking of the browser)


 
Ender [1]
Administrator
2012-04-13 19:39:59
[12 years, 228 days ago]

I do some magic with other static resources (css, js) to automatically invalidate the cache when a new version is uploaded. The "last modified" timestamp of the file is inserted into the file name, so "file.css" would show up as "file.123.css" (where the timestamp is 123) in the html. And then the server knows that when someone asks for "file.(some number).css", this actually means they want "file.css". So later when the file is updated, it now changes to "file.(some timestamp later than 123).css", the browser thinks it's a new file and doesn't read from the cache, and so the new version is fetched. I've had it on my list to do this for other static content (e.g., images) for awhile.

tl;dr:

P3 W3 Auto-versioning for all static content


 
Forum > Miscellaneous > logos and cache
Reply To Thread (login)