This article is a mirror article of machine translation, please click here to jump to the original article.

View: 11686|Reply: 0

[JavaScript] js setting cookies to be unreadable may be due to path issues

[Copy link]
Posted on 2/27/2017 3:45:24 PM | | | |


I set a cookie, but it can't be read on other pages, and I don't know why at first.

I thought there was something wrong with my code, and then I found that cookies can be saved, why can't I get them, and I found that there is a Path attribute...

After inspection, it was found that when JS was stored, it may be that the storage path was not specified, so when storing, it was stored in different directories, resulting in different results, and finally when storing, the next path was specified, and the problem was solved proudly, the code is as follows:







Previous:HtmlAgilityPack takes the data in scrip{filter}t(js).
Next:Maximum number of open connections reached.
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com