You need to sign in to do that
Don't have an account?
How to create persistant Cookie
Actually, I am developing a Salesforce Sites application that has a requirement for creating a cookie that will persist if the Browser is closed and reopened. Using the APEX Cookies class it appears that only session cookies are created.
but when I am constructing a cookie I can enter an integer value that represents the seconds that this cookie will persist within the browser.
for example
Cookie commonFields = new Cookie('commonFields',Varible_Value,null,10000,false)
But this cookie isn't persist after closing the browser. I need to persist this cookie after closing the browser.(here in the cookie value , i have set the varible value)
So how can i create persistent cookie
Thanks
Cookies should be persistent. A negative time value is supposed to create a session cookie. Maybe something else is wrong?