-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove the requirement for a specialised MIME type and rename the file to have .json extension #16
Comments
Hello there; thanks for the feedback. In fact this was the case, for roughly the reasons you gave, in an earlier draft but was revised after some discussion. The primary reason for the lack of file extension was consistency with other web specs which register /.well-known/ URLs without file extensions and the underlying W3C principle. In the general case (though less obvious in this specific case) the motivation for this is to make it more natural for site operators to change how the resource is served (a static file, a PHP script, etc) or allow it to participate in content negotiation (e.g., if a non-JSON format for expressing traffic advice were invented in the future). Given the lack of file extension, as you've noted the Our expectation is that, while not as easy as dropping a single file, users who are able to add |
@domenic FYI (in case I missed something) |
In some websites that I maintain, it requires that that we add a special function to handle this path. That's actual development time to evaluate what this is, what the response should be, and adding special hooks to the web application to support it. (The only reason it's been brought to my attention is that one site I maintain is getting almost 400 requests/day for this.) |
Deduping this into #17. |
At 1 of the largest hosters in the world (SiteGround) it is not possible on all hosting plans to set the MIME type in the .well-known folder. Siteground's response: I am afraid that this Private Prefetch Proxy option is not compatible with our servers at the moment."_ |
As the
|
The correct approach is to set an extension to the file if you need it to be served in a specific MIME type. |
Not everyone is running Apache static sites that allow users to add |
Adding a custom MIME type "application/trafficadvice+json" basically means that a special configuration for this file needs to be added to the web server configuration.
If the URL path was simply "/.well-known/traffic-advice.json" then it would have a reasonable MIME type based on the file extension, and there would be less work for site maintainers.
Ideally, website maintainers would simply add a file and let the web server serve it with the appropriate MIME type. Instead, this will require special configuration just to handle a special case, which can be a barrier to adoption.
The text was updated successfully, but these errors were encountered: