Method _ javascript skills

Source: Internet
Author: User
The method and path for specifying the cookie that js can access other domain names are similar. the host name refers to different hosts in the same domain. for example, www.sosuo8.com and blog.sosuo8.com are two different host names. By default, cookies created on one host cannot be accessed on the other, but can be controlled by the domain parameter. the syntax format is as follows:
Document. cookie = "name = value; domain = cookieDomain ";
Taking sosuo8 as an example, to achieve cross-host access, you can rewrite it:
Document. cookie = "name = value; domain = .sosuo8.com ";
In this way, all hosts under sosuo8.com can access this cookie.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.