Re: [whatwg] HTTP status code from JavaScript

Hi Qebui

On 26/05/14 05:16, Qebui Nehebkau wrote:
>
>> Tell me a good reason why JavaScript should NOT have access to the
>> status code?
>>
> There's always a good reason not to add new things. Call it inertia; every
> new feature starts at -100 points. Something like this, which gives you
> information you should already know and is only helpful when you've already
> made some seriously questionable design decisions, probably shouldn't ever
> overcome that initial deficit. Of course, that's just my opinion, but I
> have a feeling I'm not the only one.

That's an interesting point of view and I might agree with it for some
issues.

But not this one. Javascript does not have the information, the HTTP
status code, we already know (in the HTTP header). To be correct,
JavaScript is unable to read the HTTP header. The information is already
there, just not "accessible".

The browser scans the HTTP header. Why not pass it along to JavaScript?
IMO this is not really "adding a new thing" but "opening a door".

Michael

-- 

Binary Kitchen
Michael Heuberger
4c Dunbar Road
Mt Eden
Auckland 1024
(New Zealand)

Mobile (text only) ...  +64 21 261 89 81
Email ................  michael@binarykitchen.com
Website ..............  http://www.binarykitchen.com

Received on Sunday, 25 May 2014 23:58:34 UTC