During development, the cross-domain we encounter is mainly entangled in IE. When IFRAME, FRAME, or JS cross-domain in the page, IE has a security policy to limit that the page does not contain cookies, however, if we add P3P, there is no such policy.
During development, the cross-domain we encounter is mainly entangled in IE. When IFRAME, FRAME, or JS cross-domain in the page, IE has a security policy to limit that the page does not contain cookies, however, if we add P3P, there is no such policy.
Unlike common methods such as JS cross-origin and IFRAME cross-origin, you can also use P3P to implement cross-origin.
What is P3P?
P3P (Platform for Privacy Preferences) is a W3C recommendation standard for Privacy protection, providing users with Privacy protection.
The concept of the P3P standard is: the privacy policy of a Web site should inform the visitor of the type of information collected by the site, who the information will be provided to, how long the information will be retained, and how the information will be used, for example, the website shall make a statement such as "this website will monitor the pages you visit to improve the site usage" or "this website will provide you with more suitable advertisements as much as possible. Users who access the website that supports P3P have the right to view the website Privacy Report, and then decide whether to accept cookies or use the website.
How to Use P3P to implement cross-Origin
During development, the cross-domain communication that we encounter in the US space is mainly entangled in IE. When IFRAME, FRAME, or JS Cross-Domain Communication in the page, IE has a security policy to limit that the page does not contain cookies, however, if we add P3P, there is no restriction on this policy. This is also a feasible prerequisite for P3P to break through cross-origin.
The following example is an excerpt:
File Content:
File Content:
File Content: