• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 201
  • Last Modified:

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?
0
Lee5
Asked:
Lee5
1 Solution
 
maneshrCommented:
you cannot load individual images using plain HTML, but you CAN load/refresh the entire page.

to do so, add the following tag to your page

<META HTTP-EQUIV="REFRESH" CONTENT="2; URL=yourfile.html">
0
 
dmaryakhCommented:
You may also consider loading your images though the JavaScript as Image objects and then use setTimeout() or setInterval() to update the images

0
 
johnny99Commented:
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.
0
 
Lee5Author Commented:
thanks
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now