How to create cookies manually in IE

Hey guys, do you know how to create cookies for IE manually? I mean creating a programmatically cookie from scratch with a custom domain, expiration time, path and sign value.

Many thanks!

+3
source share
2 answers

You mean cookies like this:

var date = new Date();
var days = 10000;
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
document.cookie = "test" + "; expires= " + date.toGMTString(); +"; path=/";
alert(document.cookie);
+4
source

Cookies are usually created on the server using apis, for example: javax.servlet.http.Cookie . This API allows you to specify the items you are asking for. The browser simply delays the cookies it receives from the server.

cookie , , , .

javascript , , , , .

+1

Source: https://habr.com/ru/post/1716336/


All Articles