|
| This Page: Related: |
|
There are several types of cookies. http://www.propublica.org/article/zombie-cookie-the-tracking-cookie-that-you-cant-kill highights the differences between HTML4 cookies and alternatives. The "perma-cookie" invented by Verizon Wireless is inserted in traffic from smart phones. Tech company Turn used a deleted Verizon number to make zombie cookies that can't be deleted by users.
HTML5 provides an alternative to cookies.
|
|
|
function SetCookie (name, value) {
var argv = SetCookie.arguments;
var argc = SetCookie.arguments.length;
var expires = (argc > 2) ? argv[2] : null;
var path = "/"; //(argc > 3) ? argv[3] : null;
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;
document.cookie = name + "="
+ escape (value) +
((expires == null) ? "" : ("; expires=" +
expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
}
|
Cookies are saved into "document.cookie".
ASP.NET Does Not Encode Cookies in UrlEncode Format by Default
So to ensure that cookie values do not have spaces, commas, or semicolons,
built-in Javascript functions escape() and unescape() coverts and uncoverts those
characters. For example, a space is converted to %20, etc.
|
Other Explanations
|
| Your first name: Your family name: Your location (city, country): Your Email address: |
Top of Page Thank you! | |||