Jump to content

How to force a page reload on connection?


helpneeded22

Recommended Posts

I have a webpage which I frequently update which also has several images which I frequently replace. (Some of the image names stay the same, but the image is changed).

 

I want to ensure that everytime someone connects to the webpage that they are getting the most recent version of it, and the most recent images. I don't want it to pull anything from the user's cache.

 

To achieve this I have tried the following code:

 

<meta http-equiv="cache-control" content="no-cache">

 

In IE, the page itself will reload, but the images won't always update... yet sometimes they do.

 

In Chrome, it doesn't work at all.

 

Any suggestions?

 

Link to comment
Share on other sites

The meta tag only controls the caching of the HTML. If you want to control the caching of images you will have to configure the server to send headers with the image.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...