IE cannot set Cookie_javascript for short domain names
Source: Internet
Author: User
Recently, the customer found a problem when using our traffic monitoring system and GA. The data we calculated is much more than twice that of GA, and in the data we collected, the bounce rate is very high, up to about 99%. After some simple troubleshooting, I found the problem and failed to set the Cookie.
But as to why the failure occurred, I checked the problem for half a day and finally mentioned above in StackOverflow that IE cannot set cookies for short domain names since 5.0.
So what will happen if it is too short? After the experiment, we found that the Cookie cannot be set through Javascript for a total of five characters including periods and numbers, but there is a premise, that is, the domain parameter cannot be explicitly specified only when you set the Cookie. That is to say, if you write:
View the source code print help document. cookie = "key = value; domain = AB .cn ";
Cookie setting will fail. If the domain parameter is removed, write it as follows:
View the source code print help document. cookie = "key = value ";
This problem will not occur, even if the current domain is still AB .cn.
This article Workshop. For more information, see.
Because the Cookie setting fails, our traffic monitoring system considers that each access is a new access, and the bounce rate is very high. GA does not send data if the Cookie setting fails.
Firefox and Chrome have no such problems.
Mark, hope to help people who encounter similar problems.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.