Causes and solutions for loss of cookies and sessions caused by frameset

Source: Internet
Author: User
References
1. causes and solutions for loss of cookies and sessions caused by frameset
Http://blog.csdn.net/zl_c/article/details/1742775
2. Use frame to pay attention to session traps
Http://blog.csdn.net/sunyujia/article/details/2574006
3 IFRAME: solution to session loss in Frame
Http://funjackyone.iteye.com/blog/123290
4. Session loss caused by using iframe or frameset in IE
Http://blog.sina.com.cn/s/blog_474cf12b0100hcoi.html

When the framework is used to call pages under different domain names, the cookies and sessions on the pages under this domain are lost. Cause: Based on ie6.0's W3C support for the cookie p3p protocol, the framework is used to call pages in different domains. By default, ie will automatically disable cookies in this domain, therefore, cookies and sessions are lost.
Solution: add the Response Header validation information to the JSP page of the frame call.
Java code  
  1. <%
  2. Response. setheader ("p3p", "cp = CaO PSA our ");
  3. %>


The simplest way is to set it in IIS:
Management tool --> select a website --> properties --> HTTP header, add an HTTP Header
Enter the header name: p3p
Input header content: Cp = CaO PSA our
The image is as follows:
 
In the filter:
Java code 

  1. (Httpservletresponse) Response). setheader ("p3p", "cp = CaO PSA our ");
  2. Chain. dofilter (request, response );

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.