URIs specifically for JSON responses
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
LambdaCircus |
New
|
Undecided
|
Unassigned |
Bug Description
Currently the same URIs are used for serving HTML (to end users) and JSON (to API consumers), using content-type negotiation to select the appropriate representation.
1. Most (all?) browsers do not currently support caching multiple contents for a single URI but different "Accept" headers, meaning that frequently you will find yourself staring at JSON instead of HTML in your web browser whenever it decides to use a page out of the cache.
2. Internet Explorer (and possibly other browsers?) do not support altering the Accept header field in the request, making it impossible to support these browsers using content-type negotiation.
Some proposed solutions are:
1. Use a "/api" root for getting JSON responses;
2. Append "format=json" to URIs whenever you want JSON.
description: | updated |