HTML5 cross-domain request Access-control-allow-origin

Source: Internet
Author: User
Cors Protocol:

Classification of 1.COR requests:

1. A simple COR request, which sends a request directly to a cross-domain resource, contains a simple header and method. The header information returned contains access-control-allow-origin: Www.helloword.com. Represents cross-domain access for www.helloword.com domain names.

2. Complex Cor contains complex methods and headers, which require a pre-request to be sent before a real request can be sent

2. Meaning of the reply request header information

1.access-control-allow-origin:http://haha.com. Represents a domain name that allows cross-domain * to represent all domain names across domains

2.access-control-max-age:60, the delegate does not need to send a pre-request within 60 seconds to cache the result

3.access-control-allow-methods:get,put represents allow GET, and put requests cross-domain

4.access-control-allow-headers:content-type representative allows cross-domain requests to carry context-type information ()

HTML5 cross-domain request Access-control-allow-origin

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.