jekillen Posted January 11, 2016 Share Posted January 11, 2016 I have javascript code that is intended to set two cookies. The first one in this assignment document.cookie = 'TAscrollto=135; path=/; domain=192.168.1.27; max-age=3600; ' and the second in this assignment:document.cookie = 'TAscrollto=135; path=/; domain=192.168.1.27; max-age=3600; CMscrollto=199; path=/ domain=192.168.1.27; max-age=3600; ' The reason the first cookie is reproduced in the second assignment is the way my cookie manager utility works. I am assuming that would not make a difference. Both of these assignments are made just before the page reloads in call to window.location = (self processing php script). It is intended to test setting the div and textarea overflow to the figures registered in the cookies, on reload The first cookie shows up in the browser preferences for viewing cookies. The second one does not, and the behavior expected from the intended second cookie value is not evident. Firefox 34.x on Mac OSX Is there any reason visible in the strings assigned to document.cookie why the second cookie (CMscrollto) was not set? Link to comment Share on other sites More sharing options...
dsonesuk Posted January 11, 2016 Share Posted January 11, 2016 Create them individually document.cookie = 'cookie one name and values'; document.cookie = 'cookie two name and values'; The cookie stores at least 3 values cookiename, expiry date, path, you are passing 2 combined cookie infomation in one go, too many for it to process. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now