OLD | NEW |
1 <script> | 1 <script> |
2 function testSameOrigin() | 2 function testSameOrigin() |
3 { | 3 { |
4 var req = new XMLHttpRequest; | 4 var req = new XMLHttpRequest; |
5 req.open("GET", "xhr-vary-header-response.php"); | 5 req.open("GET", "http://localhost:8080/cache/resources/xhr-vary-header-respo
nse.php"); |
6 req.onload=function() { parent.postMessage(req.responseText, "http://127.0.0
.1:8000") } | 6 req.onload=function() { parent.postMessage(req.responseText, "http://127.0.0
.1:8000") } |
7 req.send(); | 7 req.send(); |
8 } | 8 } |
9 | 9 |
10 window.onmessage = function() { testSameOrigin() } | 10 window.onmessage = function() { testSameOrigin() } |
11 </script> | 11 </script> |
12 | 12 |
13 <button onclick="testSameOrigin()">Make same origin request</button> | 13 <button onclick="testSameOrigin()">Make same origin request</button> |
OLD | NEW |