<div style="display: flex; flex-wrap: wrap; white-space: pre-wrap; align-items: center; "><img height="20" width="20" style="border-radius:50%; margin-right: 4px;" decoding="async" src="https://avatars.githubusercontent.com/u/1231218?s=20&v=4" /><strong>1ec5</strong> created an issue <a href="https://github.com/openstreetmap/openstreetmap-website/issues/6388">(openstreetmap/openstreetmap-website#6388)</a></div>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2856190848" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/5694" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/5694/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/5694">#5694</a> added a link to download directions as GeoJSON. However, when I click this link, the browser gives it a .json extension, which is incompatible with some GeoJSON consumers. This appears to be because we’re setting the blob’s MIME type to JSON, which browsers map to the .json extension:</p>
<p dir="auto"><a href="https://github.com/openstreetmap/openstreetmap-website/blob/c97fff3965bb12d3588e98656f21b15ae6a322db/app/assets/javascripts/index/directions-route-output.js#L133">https://github.com/openstreetmap/openstreetmap-website/blob/c97fff3965bb12d3588e98656f21b15ae6a322db/app/assets/javascripts/index/directions-route-output.js#L133</a></p>
<p dir="auto">The official MIME type for GeoJSON is <code class="notranslate">application/geo+json</code>, which results in a .geojson extension (at least in Firefox 143 for macOS). Migrating to that MIME type would help the user better keep track of what they’ve downloaded and use it more easily. The downside is that maybe fewer applications would recognize the .geojson extension, but these applications are less likely to do anything special for GeoJSON versus regular JSON.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/issues/6388">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLIVL2WABANSXQH4ZA33RW6EVAVCNFSM6AAAAACF6GER2WVHI2DSMVQWIX3LMV43ASLTON2WKOZTGM4TKMBYHA4TCOI">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLOGM7AV4AKMZ7FL7M33RW6EVA5CNFSM6AAAAACF6GER2WWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHMUXHSC4.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/issues/6388</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>

<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/issues/6388",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/6388",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>