Add guidance on how to host and load contexts.
The spec should have some guidance on how sites should host contexts and how processors should load contexts.
Contexts are just JSON-LD so could be hosted and retrieved in a number of ways. Guidance might help processors and sites interoperate better. A few hosting possibilities:
- Regular resource like
https://example.com/contextthat always returns the context asapplication/ld+jsonorapplication/json. - Resource that does content negotiation and returns a context only for
application/ld+jsonorapplication/jsonrequests. - Resource that does content negotiation and returns a context for
application/ld+jsonorapplication/jsonrequests or a HTML embedded context fortext/htmlrequests.
I'm assuming most processors will set Accept to at least application/ld+json and application/json but perhaps the spec should explicitly recommend this.
As an example in practice, Google is using a context of http://schema.org/ which will obviously return just HTML for most requests unless content negotiation is setup and used on both processors and the server.
These all seem reasonable. I wonder if we would also need some discussion about retrieving the context from the HTML document in that case. Nevermind the case where an HTML document has two or more script elements of type application/ld+json, one of which is the context.
Maybe the best thing, at least within the specs, is to be silent on JSON-LD within HTML and leave that to a separate note.