function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
camforcecamforce 

apex:page action not loading cookie initially/properly

Hi Guys,

 

I've been having trouble with loading a preset cookie (set from a login page) using the action attribute of a page called 'Home'. I've tested my login page thoroughly an there doesn't seem to be any problems with creating the cookie or clearing it. It redirects to the page Home which I then have test to see if there is a valid cookie active by running a method on the action attribute of the page. As far as I can gather, the page always initially loads a previous state of the cookie (as if it is being cached). When I first login, the cookie (outputted in a string variable) appears blank. But if I refresh the page, suddenly the cookie's contents are there.Then if I log out (clearing the cookie) and login as another user, the previous user's cookie details appear. And again if I refresh the page the current user's cookie details appear.

 

I should point out that this behaviour only occurs within a Salesforce Site. Everything was fine when testing the pages standalone, the cookie loads first time without any problems.

 

Any insight into this issue would be greatly appreciated.

 

Kind Regards,

 

Paul

 

camforcecamforce

After doing some more testing, I have found that this problem only seems to occur within Firefox and Chrome. I tested it on IE7, Opera and Safari (windows version) and it seems to work fine for them.Obviously there

 

I still have no idea what I can do to fix this apart from forcing a refresh when the page loads which is just messy.