Create a Cookie with JavaScript. JavaScript can create, read, and delete cookies with the document.cookie property. You can also add an expiry date (in UTC time). With a path parameter, you can tell the browser what path the cookie belongs to. By default, the cookie belongs to the current page.