Hello,

I have an app that constantly uploads an image from the webcam. I am using the following script to view it which works great. Except I am getting "Loading..." a lot and no image during that time. I assume it is trying to load the image when it is being written? What can I do to keep the previous image there during the Loading time?

Or is there a better way to do this where it is fast and not showing the Loading?

Thanks!!

Code:
<HTML>
<HEAD>
<TITLE>Watch</TITLE>
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"> 
<META HTTP-EQUIV="EXPIRES" CONTENT="Mon, 22 Jul 2020 11:12:01 GMT"> 
</HEAD>
<BODY LINK=BLUE ALINK=BLUE VLINK=BLUE>
<script language="javascript" type="text/javascript" >
function ChangeMedia(){
	var d = new Date();
	var t = d.getTime();
	document.getElementById('cmr').src = "pic.jpg?"+t;
}
var reloadcam = setInterval("ChangeMedia()",500);
</script>
<img src="pic.jpg" alt="Loading..." name="cmr" width="320" height="200" border="0" id="cmr" />
<BR>
<BR></BODY>
<HEAD>
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"> 
<META HTTP-EQUIV="EXPIRES" CONTENT="Mon, 22 Jul 2020 11:12:01 GMT"> 
</HEAD>
</HTML>