0

I have a program that retrieves an image every 60 seconds(if a new one exists). Whenever something on the image must change, the server sends a new image to the browser.

How can I create a javascript popup that notifies when when there is a new image placed in the DOM?

I cannot do this by using the filename, since the filename (of the image) stays the same...

NOTE: this must be implemented in the Browser JS script/input itself, since I do not have access to the source code files

Any ideas?

Thank you

DextrousDave
  • 6,603
  • 35
  • 91
  • 134
  • You could add a random query var in the image's url, and check if it changed. This needs to be done on the server though. – elclanrs May 28 '13 at 04:56
  • will height/width get changed? –  May 28 '13 at 04:58
  • @Tamil...Nope, I think the only thing that changes is the size of the image....(not the dimensions or format) – DextrousDave May 28 '13 at 04:59
  • @DextrousDave, Check http://stackoverflow.com/a/12950557/405398 out! `toDataURL` seems helpful. –  May 28 '13 at 05:08

0 Answers0