Photos won't refresh after upload

I'm uploading photos in a form, then edit, and upload again, but shows the same photo until I refresh the page. Everything I find for pragma no-cache is for IE 4 or 5? Whats the deal?
How can I have my page show the newest image that I most recently uploaded? Is there a way to do with coldfusion? or maybe even htaccess?
Who is Participating?
Gurvinder Pal SinghCommented:
check the second last reply of the thread in this link
Gurvinder Pal SinghCommented:
did you tried removing that image element and creating the same again?

Also try this

document.getElementById("imgId").src = document.getElementById("imgId").src;

where 'imgId' is the id of the image
Gurvinder Pal SinghCommented:
please try this one liner code in following link
monosythAuthor Commented:
I ended up using something similiar to that:

<img src="/img/photo1.jpg?newest=#now()#">

where now() is the date down to the millisecond and browser thinks its a new image everytime.
Gurvinder Pal SinghCommented:
Thanks for the points
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.