Skip to content

Commit

Permalink
Added explanation to CORS demo
Browse files Browse the repository at this point in the history
  • Loading branch information
samdutton committed Jan 20, 2017
1 parent d3eabcf commit dec8586
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions cors/index.html
Expand Up @@ -24,6 +24,8 @@

<h1><a href="../index.html" title="simpl.info home page">simpl.info</a> CORS</h1>

<p class="strong">A CORS request is made for this page using XHR. The response will be displayed below.</p>

<p id="response"></p>

<script type="text/javascript">
Expand All @@ -42,11 +44,6 @@ <h1><a href="../index.html" title="simpl.info home page">simpl.info</a> CORS</h1
return xhr;
}

// cors.php looks like this:
// <?php
// header("Access-Control-Allow-Origin: *");
// echo "This text was retrieved by a CORS request to thehillsarealive.net/cors.php";
// ?>
var request = createCORSRequest("get", "https://simpl.info/cors/index.html");
if (request){
request.onload = function(){
Expand Down

0 comments on commit dec8586

Please sign in to comment.