Jump to content

[Resolved] Force Browser Cache to clear


keat

Recommended Posts

We had a promotion this weekend (black friday), so I added an image to the front page.

After a few hours, I changed the image, yet some people are telling me that they can still see the old image.

I suspect that their browser cache has held the earler images.

Is there anything I can put in place to force a browser cache clear so they see the changes ?

Link to comment
Share on other sites

If the image on the front page is something other than the store's logo, but rather a spurious image in the HomePage document content, then changing the name is the correct solution.

But if the situation requires that the image really should be named something specific (for whatever reason), and the image itself changes, then in the HTML of the document for the <img> tag of that image, put a question mark after the filename.

The "?" starts a querystring and thus forces the browser to ignore what may be already in its internal cache, always fetching a fresh copy of the page resource (the image).

Link to comment
Share on other sites

We had a banner saying Black Friday 15% off, the image was called 'bf.jpg'

We then decided to extend this to the whole weekend, so I created a new image, but for ease called it 'bf.jpg' and just uploaded it over the top, not thinking that browsers might cache the page.

The event has now finished.. it does appear that simply renaming the logo file has forced a cache update. (from what I can see at my end)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...