简体   繁体   English

如何识别Cookie是否由javascript设置(客户端)

[英]How to recognize if a cookie is set by javascript or not (client-side)

I am working with selenium and python. 我正在使用硒和python。 I need to know if a particular cookie is set by javascript or not. 我需要知道某个Cookie是否由javascript设置。 Is there a way to do that? 有没有办法做到这一点?

I use https://github.com/carhartl/jquery-cookie works perfect. 我使用https://github.com/carhartl/jquery-cookie完美。

Read cookie: 读取Cookie:

$.cookie('the_cookie'); // => "the_value"
$.cookie('not_existing'); // => undefined

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM