Enforcing clearance of the browser cache

Discussion of general topics related to the new version and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Post Reply
Tariq
Registered User
Posts: 1
Joined: Mon Dec 01, 2008 11:54 am

Enforcing clearance of the browser cache

Post by Tariq »

People who frequently work on the design of their boards to adjust little things may know the problem, that changed style sheets or graphics are not visible to users who already visited the board before, because their browser uses the locally cached version of the files. Making an announcement to all users, that they have to press refresh because I exchanged a button is of course no solution. ;)

I came across a very interesting idea and i wonder if this wouldn't be a nice feature to have.

The principle is simple:
Instead of replacing for example
{SITE_LOGO_IMG}
by
/styles/prosilver/imageset/site_logo.gif
it would be replaced by
/styles/prosilver/imageset/site_logo.gif?rev=1

The rev-parameter is of course ignored by the server, because the file is an ordinary image, but every browser will handle site_logo.gif?rev=1 and site_logo.gif?rev=2 like two different files. So if you now want to change your site logo you would go to the ACP an increase the rev-counter after you uploaded the new file and every browser would immediately show the new image because their is no cached version of site_logo.gif?rev=2 but only of site_logo.gif?rev=1.
statm1
Registered User
Posts: 43
Joined: Thu Jul 21, 2005 7:58 am

Re: Enforcing clearance of the browser cache

Post by statm1 »

I do like the basic idea.. Maybe alittle crude though..
Post Reply