<p>Domain sharding <a href="https://love2dev.com/blog/domain-sharding-http-2/" rel="nofollow">is an http/2 antipattern</a>. Browsers and servers are supposed to detect sharding, but that doesn't always happen, for example if a.tile and b.tile resolve to different IP addresses - and even then, it still takes a bit of extra effort.</p>
<p>This detects whether the client is connecting over http/2, and instructs it not to use four subdomains to load tiles.</p>
<p>If the browser supports http/2, use a.tile.openstreetmap.org instead of {switch:a,b,c,d}.tile.openstreetmap.org and gps-a.tile.openstreetmap.org/lines/{z}/{x}/{y}.png instead of <a href="https://gps-%7Bs%7D.tile.openstreetmap.org/lines/%7Bz%7D/%7Bx%7D/%7By%7D.png" rel="nofollow">https://gps-{s}.tile.openstreetmap.org/lines/{z}/{x}/{y}.png</a>.</p>
<hr>
<h4>You can view, comment on, or merge this pull request online at:</h4>
<p> <a href='https://github.com/openstreetmap/openstreetmap-website/pull/2584'>https://github.com/openstreetmap/openstreetmap-website/pull/2584</a></p>
<h4>Commit Summary</h4>
<ul>
<li>If http2 supported, disable tile domain sharding</li>
</ul>
<h4>File Changes</h4>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2584/files#diff-04a887e53025b45e717150bdb931aa5a">vendor/assets/leaflet/leaflet.osm.js</a>
(26)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/2584.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/2584.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/2584.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/2584.diff</a></li>
</ul>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2584">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLKWTTQNFBAUNJ6TUFDRLYHZZANCNFSM4ME55M2A">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAK2OLPBVPG5UV4F7RQ6JQ3RLYHZZA5CNFSM4ME55M2KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4I44WP6Q.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/2584",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/2584",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>