actions .
Expand|Select|Wrap|Line Numbers
- (1)<html>
- (2)<head>
- (3) <title>Simple :: documentDomain :: Cars</title>
- (4)</head>
- (5)<body>
- (6) <script>
- (7) var fake = window.location;
- (8) document.domain = "localhost";
- (9) var href = window.location.href;
- (10) </script>
- (11)</body>
- (12)</html>
Page is accessed on localhost.
a. If line (7) or (8) is omitted, no exception occurs.
b. If page is hosted on production with document domain name equal to
something.com, all works well.
c. In IE7 all is working fine.
Is it IE6 bug?
Is it possible to prevent exception for accessing all window.location.href properties after document.domain was set?