On one of the views I display an image “some_week.jpg”, which basically displays a graph for data corresponding to a particular week, by default current week.
Following is the code snippet in view which displays an image,
On this view, User has an option of selecting some other week and see the graph corresponding to it. I have implemented this using an AJAX call where the graph image is constucted using Gruff library on server side and following response is sent back from RJS,
page.replace_html ,“image_place_holder”, imageTag
where, session[:user_id] =1 and @picName = “some_week.jpg”
After the response the image in the browser is still the old image, I verified on server, the new image is created in the mentioned directory but browser seem to cache the old image.
I am using Mozilla Firefox 18.104.22.168.
Help is appreciated.