0

I have a simple javascript that pans through webcam images. I does not update the images until one goes in and clears the cache, at that point the most recent images show up. Is there some code in javascript I can use to have this done or is there another method to achieve this?

Thanks
DS

3
Contributors
5
Replies
6
Views
9 Years
Discussion Span
Last Post by drsmith
0

Nevermind, thought it was fixed but the meta tags I was trying have not been successful beyond the first image. Any JS solutions to this?

0

The only valid solution to this problem of yours is to set proper response headers related to caching. For e.g. to make images uncacheable, serve them with a response header Expires: some past date . Google for caching headers.

0

Simply set an onbeforeunload event. One, you can give the user a chance to re-think the decision to leave the page by spawning a "yes/no" dialog box; and two, just having an onbeforeunload event will cause the browser to never cache the page: This means that the page will always be rendered exactly as if the user was hitting it for the very first time.
This should go inside the <head><!-- || --></head> tags'.

<script type="text/javascript">
<!-- BEGIN HIDING
window.onbeforeunload = function () {
 // This fucntion does nothing. It won't spawn a confirmation dialog
 // But it will ensure that the page is not cached by the browser.
}
// END HIDING -->
</script>
0

Thanks for the ideas. I am trying them out now. Its funny, everything is working fine in FF but IE7 not so much.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.