<p>Right not we have </p>

<pre><code>    url: document.location.protocol === 'https:' ?
  'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png' :
  'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
</code></pre>

<p>This could be shorter as</p>

<pre><code>url: '//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
</code></pre>

<p>(note the // in front) and the browsers will use the same protocol as the page was transported.<br><a href="http://www.paulirish.com/2010/the-protocol-relative-url/">http://www.paulirish.com/2010/the-protocol-relative-url/</a></p>

<p>Perhaps this is useful for other places in the website code (especially if there is no JS involved).</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href='https://github.com/openstreetmap/openstreetmap-website/issues/700'>view it on GitHub</a>.<img src='https://github.com/notifications/beacon/1419053__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcwNzczOTM3NywiZGF0YSI6eyJpZCI6MjU1MDIwMjd9fQ==--ceb84e55a0fe4628169c91bbff50b15482255310.gif' height='1' width='1'></p>