1ec5 created an issue (openstreetmap/openstreetmap-website#6388)

#5694 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:

https://github.com/openstreetmap/openstreetmap-website/blob/c97fff3965bb12d3588e98656f21b15ae6a322db/app/assets/javascripts/index/directions-route-output.js#L133

The official MIME type for GeoJSON is `application/geo+json`, 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.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/6388
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/issues/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to