Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
08-28-2010, 05:54 PM #1
- Join Date
- Aug 2010
- Thanked 0 Times in 0 Posts
Beginner's AJAX request - refreshing images
I have a web page which loads four images from a server - the images are captures from a webcam feed which are updated every 5 minutes via FTP (named "image0.jpg","image1.jpg","image2.jpg" and "image3.jpg").
the images are inside a table and are already within <DIV> tags.
Currently I have a simple META refresh which reloads the whole page every two minutes, as I know precisely nill about AJAX - but clearly this is very inefficient and puts unnecessary load on the server.
What I am posting to ask is, from the very top, with the only assumed knowledge that I know how to write HTML and change file permissions on the server - how do I use AJAX to reload these images every minute?
Hopefully this is an easy ask of anyone who knows something about AJAX - thanks!
08-28-2010, 11:18 PM #2
- Join Date
- Jun 2002
- Between DC and Baltimore In a Cave
- Thanked 94 Times in 88 Posts
What you are doing is not causing massive strain on the server. You are not talking about a page that is dealing with tons of backend resources.
Ajax does not require changes on the server.
BUT in your case Ajax is not needed to update images.
To update an image you just to update the src, to make sure you do not get it from the cache you need to add a useless querystring.