| |||||||
| Internet Explorer Discuss IE7 or any other IE version. |
![]() |
| | LinkBack | Thread Tools |
| |||
| IE7 problem - cookies lost after open and close page in Internet Z Can anyone help with this problem? Here are the steps to replicate an error in which IE7 discards cookies after: - A page is opened in the Local Machine zone. - Another page is opened in the Internet zone. - The page in the Internet zone is closed. To replicate the error: 1. Place the files test1.html and test2.html (source code is below) in a folder on your local hard disk. 2. Double-click test1.html to open it in the Local Machine zone in IE7. 3. Observe that the cookie "foo" has the value "goo". 4. Click the link to open http://www.midicorp.com (a webpage in the Internet zone) in a new window. 5. After the page opens, close the new window. 6. Click the link to go to the next page (test2.html). 7. On test2.html, observe that document.cookie is now the empty string. Interesting facts: - If you don't open a page in the Internet zone before proceeding to test2.html, cookies are NOT lost. - If you open a page in the Internet zone but don't close the window, cookies are NOT lost. - Adding the Mark of the Web to test1.html and test2.html does NOT prevent losing cookies. ----------------------------- SOURCE OF TEST1.HTML ----------------------------- <script> document.cookie = "foo=goo"; document.write ("On test1.html, cookies are: " + unescape (document.cookie)); </script> <br> <a href="http://www.midicorp.com" target="_new">Open midicorp.com in a new window</a> <br> <a href="test2.html">Go to next page</a> ----------------------------- SOURCE OF TEST2.HTML ----------------------------- <script> document.write ("On test2.html, cookies are: " + unescape (document.cookie)); </script> |
| |||
| Re: IE7 problem - cookies lost after open and close page in Internet Z "Steven Saporta" <StevenSaporta@discussions.microsoft.com> wrote in message news:F979006D-CCBC-410A-AEB2-8440E398DE83@microsoft.com... > Can anyone help with this problem? I think you might find more interest in it on the MSDN forum for IE web development http://forums.microsoft.com/MSDN/Sho...D=923&SiteID=1 Good luck Robert Aldwinckle --- |
![]() |
| Bookmarks |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Internet Explorer has encountered a problem and needs to close. | Don | Internet Explorer | 15 | 05-06-2007 10:17 AM |
| Problem with Internet Explorer 7 page does not finish | mark | Internet Explorer | 9 | 05-06-2007 08:31 AM |
| Internet explorer why does it close down every time I close a page | creativpresentations | Internet Explorer | 3 | 05-06-2007 07:15 AM |
| Internet Explorer Start Page problem | szeik@hotmail.com | Windows XP | 2 | 02-20-2007 07:31 AM |
| "internet explorer has encountered problem and must close" why? | Alan | Windows XP | 1 | 01-05-2007 05:00 PM |