+ Start a Discussion
DaveHDaveH 

Weird data refreshing issues

Hey All,

 

I currently have a force.com site enabled in one of our sandboxes. This site allows external users to update a custom "Subscription" object which stores email preferences. The problem I am having is when a user FIRST visits the page all of the data displayed on the page is correct. When the user updates some info and clicks Save, they are redirected to a "Success" page if it was successful. The problem arises when the user then tries to go back to the page to view the changes, the data that is displayed is the old data. Even if the user hits refresh on their browser it still pulls the old data. Even if the user closes/reopens a new instance of the browser the data is old. I found this post: http://boards.developerforce.com/t5/Force-com-Sites/Related-list-values-not-refreshing-on-sites-pages/m-p/173649/highlight/true#M2500 but the suggestion in this did not help me because 1) Since it is the sandbox caching is not possible and 2) I did what they suggested and the same thing happens. Users do not need to login to see their preferences at the moment, all that you need is the correct ID in the URL string and it pulls the corresponding data. Since this is a test environment I can put the site for people to try it themselves (See below). Has anyone ran into this before? If you need code let me know and I can post select portions of it. Thanks in advance!

 

The site: *REMOVED*

 

Best Answer chosen by Admin (Salesforce Developers) 
DaveHDaveH

I found the issue after a lot of obssesing over the issue. I was using a redirect page which I did not specify cache="false". I only specified that on the main page AFTER the redirect page so it ended up caching the data. After I updated the redirect page it works. 

All Answers

DaveHDaveH

On a side note, I think this could either be related to a weird bug in the sandbox (in which case moving the site into production would fix the issue) or it could be a problem with the redirect. These are just guesses so if anyone else has any input that would be great.

 

EDIT: I found that clearing all IE's temp. internet files before visiting the site causes the data to be refreshed but that is the only way to get updated data. I feel like I might be missing something simple here but I just can't think of anything.

DaveHDaveH

I found the issue after a lot of obssesing over the issue. I was using a redirect page which I did not specify cache="false". I only specified that on the main page AFTER the redirect page so it ended up caching the data. After I updated the redirect page it works. 

This was selected as the best answer