• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to refresh image automatically on a page

 
Hope Zhu
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working on a test html page to auto refresh an image, the image is taken by my webcam. If the image name remain the same the image won't refresh automatically. Can someone please help!! Below is my code.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65120
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to use code tags when posting code to the forums. Unformatted code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please read this for more information.

You can go back and change your post to add code tags by clicking the button on your post.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are cached, you need to add a random querystring value to break the caching



Eric
 
Hope Zhu
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Eric! I am still confused. By using "webcam1.jpg?ts=" + encodeURIComponent( new Data().toString() ), do you mean I need another file name instead of webcam1.jpg to break the caching?

Hope
 
Hope Zhu
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I understand now. problem fixed, thanks a lot!
Hope
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic