Below is a JavaScript cookie that is written on the user\'s computer for 12 months.
After we set the cookie on our main domain such as example.com, shou
example.com
You can also use the MDN JavaScript Cookie Framework and do:
docCookies.setItem('HelloWorld', 'HelloWorld', myDate, '/', 'example.com');