Javascript How To Set Cookie Globally for all pages

Javascript How To Set Cookie Globally for all pages 

For one page we can set Cookie as follows:

document.cookie = "myVarName=YourValue;";


For global we can set Cookie as follows just added extra 'path=/':

document.cookie = "myVarName=YourValue; path=/";
Javascript How To Set Cookie Globally for all pages Javascript How To Set Cookie Globally for all pages Reviewed by Pranay Gondane on 1:23:00 AM Rating: 5

No comments

Free! Free!Free! Subscribe to Get Free PHP (Magento) tutorial Update in Your Inbox!!! Hurry Up!!!