Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="javascript How to check if a URL is same origin as current page">
  <meta charset="utf-8">
  <title>javascript How to check if a URL is same origin as current page?</title>
</head>
<body>
  <table>
    <tr>
        <th>link</th>
        <th>is same origin?</th>
    </tr>
    <tr>
        <td><a href="http://varsity.com">Varsity</a></td>
        <td></td>
    </tr>
    <tr>
        <td><a href="http://google.com">Google</a></td>
        <td></td>
    </tr>
    <tr>
        <td><a href="http://stackoverflow.com">Stack Overflow</a></td>
        <td></td>
    </tr>
    <tr>
        <td><a href="http://jsfiddle.net">JS Fiddle</a></td>
        <td></td>
    </tr>
    <tr>
        <td><a href="http://null.jsbin.com">JS Bin</a></td>
        <td></td>
    </tr>     
  </table>
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
sean9999pro
0viewers