Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all
i have a web project , the first page of it is login page , which after user login , i save user name in a cookie .
when i tested it in safari browser, i found the cookie is null all time.

So, if safari doesn't support saving cookie or there is a solution ??

Any Help...

Thanks
Posted

1 solution

you are just writing the cookie and do not have control over the site reading/displaying the value to put in the URLDecode you can also do something like this:

C#
ckCookie.Value = (Server.HtmlEncode( strSpecialCharacters )).Replace(";","");

This will ensure the full string is set in the cookie and Safari, Chrome, Firefox and IE will still recognize the html codes even without the ; and does not require decoding when read.

For a longer answer on cookie specs see:
http://stackoverflow.com/questions/1969232/allowed-characters-in-cookies/1969339#1969339[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900