Blueforcer Well-Known Member Licensed User Longtime User Jul 20, 2018 #1 I need to update an picture in my webapp Code: Copy <img id="images" src="url" class="center"> The server generate every 1s a new picture with the same Name, now i update the picture with Code: Copy images.SetProp("src","pic.png") ws.Flush this work once. i think because the browser cache the pic.png and use this instead of the new one. Is it possible to tell the browser to use the new pic? i tried to name the file with a random number and delete the old one. but this need a huge number to never get the same picname. im also tried to disable the cache with Code: Copy <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" /> but this has no effect
I need to update an picture in my webapp Code: Copy <img id="images" src="url" class="center"> The server generate every 1s a new picture with the same Name, now i update the picture with Code: Copy images.SetProp("src","pic.png") ws.Flush this work once. i think because the browser cache the pic.png and use this instead of the new one. Is it possible to tell the browser to use the new pic? i tried to name the file with a random number and delete the old one. but this need a huge number to never get the same picname. im also tried to disable the cache with Code: Copy <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" /> but this has no effect
Blueforcer Well-Known Member Licensed User Longtime User Jul 20, 2018 #2 works with: Code: Copy images.SetProp("src","pic.png?" & DateTime.Now) Upvote 0