4 ms·
It could use the Accept header if there is no extension. For example, if it ends with ".html" then it will display the HTML, if it ends with ".json" then the JS
by zzo38computer 5y ago
It could use the Accept header if there is no extension. For example, if it ends with ".html" then it will display the HTML, if it ends with ".json" then the JSON, and if neither then use the Accept header. Having an extension to override it is useful; when not explicitly specified then it could use the Accept header to do it instead.
(Another comment mentions that Cloudflare doesn't work with it, but Cloudflare has a lot of undesirable features anyways, so I do not use it.)
Another possibility might be <link rel="data">, in case you want to access data (which could have multiple formats (e.g. CSV, JSON, etc), so could occur more than once) without having the URL already or having to run the web application to do everything.