Originally from http://stackoverflow.com/questions/6725890/location-host-vs-location-hostname-and-cross-browser-compatibility/11379802#11379802
xxxxxxxxxx
<html>
<head>
<meta charset=utf-8>
<title>Link anatomy</title>
<link rel="stylesheet" href="index.css">
</head>
<body>
<span id="href" title="href"><span id="protocol" title="protocol">http:</span>//<span id="host" title="host"><span id="hostname" title="hostname">example.org</span>:<span id="port" title="port">8888</span></span><span id="pathname" title="pathname">/foo/bar</span><span id="search" title="search">?q=baz</span><span id="hash" title="hash">#bang</span></span>
<script src="https://code.jquery.com/jquery-latest.min.js"></script>
<script src="index.js"></script>
</body>
</html>
Modified http://code.jquery.com/jquery-latest.min.js to a secure url
https://code.jquery.com/jquery-latest.min.js