Im trying to set a cookie with the value /sv/en and the / ends up like %2F in the cookie, so I wonder how to encode or whatever you have to do to write a / instead.
Im using this to set the cookie now.
Response.Cookies("googtrans")="/sv/en"
Response.Cookies("googtrans").path = "/"
Response.Cookies("googtrans").expires = "2038-01-01 10:00"
Response.Cookies("googtrans").domain = ".mypage.se"
So how can I write a / in the cookie? Thanks a lot!
Through the Response.Cookies collection URL Encoding (and vice versa URL Decoding) is implicit.
To prevent this, you need to set a raw cookie with Response.AddHeader instead.
Response.AddHeader "Set-Cookie", "googtrans=/sv/en; expires=2038-01-01 10:00; domain=.mypage.se; path=/"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With