tags:

views:

53

answers:

1
+1  Q: 

Refresh browser?

hello all,

I am working with images and changing their sizes dynamically from the input I get from the user.

when I change the size of the image first time it doesnot reflect the changes when I click the refresh the page using the browser button the change gets reflected and after that tere is no need to click the refresh button

Please tell how shall I do it so that there is no need to click the refresh button of the browser ,the changes but get reflected at one shot.

Thanks Ritz

A: 

Your browser is cacheing the image. One easy way to get around this is to append something to the image URL such as "?v=101", "?v=102", etc. where the number is a version # you track on each image.

E.g.:

Or:

You don't have to look at the version number in your code, but its presence on the URL makes the browser think it's a different resource and therefore load it again without having to refresh.

dkamins