Link to home
Start Free TrialLog in
Avatar of Lee5
Lee5

asked on

Automatically refresh page

I have an html page on my site that contains some .jpg files.  These files change frequently, so I would like to add code to make the user's browser load my pictures rather than the old ones they have in storage in their computer.  How can I do this?
ASKER CERTIFIED SOLUTION
Avatar of maneshr
maneshr

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dmaryakh
dmaryakh

You may also consider loading your images though the JavaScript as Image objects and then use setTimeout() or setInterval() to update the images

Or how about this -- use different names for the images, and use JavaScript to write the image names based on the date or other variable.

The only way to really make sure people don't have cached images showing up is to change the image name and the HTML.

For instance, you could force all your images to reload by renaming the folder they were in from IMG/ to IMAGE/ -- but then you'd have to do a GREP on all your pages so that the code referred to that folder.
Avatar of Lee5

ASKER

thanks