+ Start a Discussion
App_Dev1App_Dev1 

Cookie headers

Is there some filtering going on before HTTP headers are passed to my controller?

I'm trying to pull the Cookie header out, but it never appears as a key in System.currentPageReference().getHeaders() map. I see lots of other headers there, but no cookies.

As it stands, to write a cookie-aware app I need to do it all in Javascript. (Write the cookie, read the cookie and post back to VF for the cookie's state to become part of the page state). Not ideal.

Thanks for any help.

TehNrdTehNrd
I'm bringing this one back from the dead but did you ever figure this one out? I'm looking at an app that may use cookies and ideally I'd like to access the values in the contructor so I can default values.
dchasmandchasman
Visualforce has always blocked access to cookies server side - various security reasons drove this decision - we do have supporting cookie access on the roadmap once these security concerns can be alleviated.
lopezclopezc

So is there any way to pass the cookie (got using Javascript) to the controller before the page is loaded?

 

Please help!!