i know this way that extend src of image with ?version=new Date.gettime but this way can't help me please tell me how clear one image from brwoser image cache. also i will not refresh page to any way . tnx.
Asked
Active
Viewed 460 times
1
-
possible duplicate of [Refresh image with a new one at the same url](http://stackoverflow.com/questions/1077041/refresh-image-with-a-new-one-at-the-same-url) – Joe Taylor Jan 06 '15 at 11:22
-
i know this way but it cant help me.tnx – Farzad.Jafari Jan 06 '15 at 11:23
-
2If you read through the answers, it exhaustively details many different techniques. See this answer for instance: http://stackoverflow.com/a/22429796/332868 If you believe your question is not a duplicate you should explain why you believe your case is not covered in that question. – Joe Taylor Jan 06 '15 at 11:27
-
`but it cant help me` ???? explain this.. – Cerlin Jan 06 '15 at 11:29
-
i work with backbone and i would chage profile image.i will after successfull upload without render any of views change images that same with profile image.is enough???? – Farzad.Jafari Jan 06 '15 at 11:32
1 Answers
0
Try using javascript for a particular image-id like,
document.getElementById('image-id').src += new Date().getTime();
And in jquery try,
$('#image-id')[0].src += new Date().getTime();

Rohan Kumar
- 40,431
- 11
- 76
- 106
-
-
when you use this way older image remain in cahce browser and i dont want it – Farzad.Jafari Jan 06 '15 at 11:40
-
Yes, I read it *tell me how clear one image from brwoser image cache* – Rohan Kumar Jan 06 '15 at 11:52