问题描述
----------------------------------------------- ------------------------
常见问题解答主题 - 如果网页浏览器接受cookie,我如何在javascript中看到? />
-------------------------------------------- ---------------------------
写一个cookie,读回来然后检查一下这是一样的。
附加说明:
===
这样的发布每天自动发送一次。他们的b
目标是回答重复的问题,并将内容提供给社区进行持续评估/改进。完整的
comp.lang.javascript常见问题解答位于。
FAQ工作人员是一群志愿者。
-----------------------------------------------------------------------
FAQ Topic - How can I see in javascript if a web browser accepts cookies?
-----------------------------------------------------------------------
Writing a cookie, reading it back and checking if it''s the same.
http://www.w3schools.com/js/js_cookies.asp
Additional Notes:
http://www.jibbering.com/faq/faq_notes/cookies.html
===
Postings such as this are automatically sent once a day. Their
goal is to answer repeated questions, and to offer the content to
the community for continuous evaluation/improvement. The complete
comp.lang.javascript FAQ is at http://www.jibbering.com/faq/.
The FAQ workers are a group of volunteers.
推荐答案
你不能吗?只需检查window.navigator.cookieEnabled?
Andrew Poulos
Can''t you just check window.navigator.cookieEnabled?
Andrew Poulos
你能不能检查一下window.navigator.cookieEnabled?
Can''t you just check window.navigator.cookieEnabled?
是否有任何浏览器没有实现此功能? [ie和ff似乎没问题]
-
Evertjan。
荷兰。
(请将我的电子邮件地址中的x'变为点数)
Are there any browsers not implementing this? [ie and ff seem ok]
--
Evertjan.
The Netherlands.
(Please change the x''es to dots in my emailaddress)
你不能只检查窗口.navigator.cookieEnabled?
Can''t you just check window.navigator.cookieEnabled?
是否有任何浏览器没有实现此功能? [ie和ff似乎没问题]
Are there any browsers not implementing this? [ie and ff seem ok]
没关系,因为测试没有考虑到
账户内容插入/重写代理的动作可能会重新编写引用cookie的代码,以便它不会(即
更改所有出现的字符序列' 'cookie''进入
别的东西)。
Richard。
It would not matter is there were not as that test doesn''t take into
account the actions of content inserting/re-writing proxies which may
re-write the code that references cookies so that it does not (i.e.
change all occurrences of the character sequence ''cookie'' into
something else).
Richard.
这篇关于常见问题主题 - 如果网页浏览器接受cookie,我如何在javascript中看到?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!