Skip to content Skip to sidebar Skip to footer

Force Browser To Ignore Cache

My code crops a photo. The cropped photo is constantly replaced but the browser only ever loads the first crop. I have scoured the web but nothing has worked. I have added random s

Solution 1:

You have the following choices: - add the following meta tag, this will force not to cache

<meta http-equiv="pragma" content="no-cache" /> which you have already as I see
  • moreover, if you want to load new version of the css file, do the following

< link rel="stylesheet" type="text/css" href="mystyle.css?version={NewVersionOnRequierd}">

  • same for the image
< img src="picture.jpg?123" alt="">

Solution 2:

Okay, I eventually solved the problem by appending a random string to the image element source, as I have tried many times. There appeared to be something wrong with my Firefox installation. Difficult to draw any conclusions. Thanks for the contributions.

Post a Comment for "Force Browser To Ignore Cache"