Lurker News

Comments (229) 60 threads

Show all comments

Showing thread 22 of 60

stephenr#
Or you could... you know.. do type negotiation per-request based on the Accept header, and serve the rendered markup sans JSON bullshit to clients requesting markup, and the JSON data to clients requesting JSON.

I know it's a complex idea, and it's hard to grasp ideas when they're first proposed, but the payoff is often worth the time invested. Even though it's only been 24 years since the RFC defining the Accept header was published, maybe it'd be worth spending say, 10 minutes reading about what it is, rather than however long it took you to write this abomination?