Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q892 How can I force the browser to load an newer version of the same named image from the server?

irt.org | Knowledge Base | JavaScript | Image | Q892 [ previous next ]

Q892 How can I force the browser to load an newer version of the same named image from the server?

The image is stored in the browsers cache - you need to either stop it being cached by adding the following to the document:

<html>

<head>
<meta http-equiv="Expires" content="Fri, Jun 12 1981 08:20:00 GMT">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
</head>

<body>
...
</body>

</html>

Or refresh the image using a simple JavaScript trick:

<a href="page.htm" value="Reload"><img src="picture.gif" onLoad="this.src='picture.gif?' + (new Date()).getTime()"></a>

Feedback on 'Q892 How can I force the browser to load an newer version of the same named image from the server?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.