Open
Bug 999886
Opened 10 years ago
Updated 2 years ago
Unable to get the HTTP status code for the page itself from JavaScript
Categories
(Core :: DOM: Core & HTML, defect, P5)
Tracking
()
UNCONFIRMED
People
(Reporter: michael.heuberger, Unassigned)
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:28.0) Gecko/20100101 Firefox/28.0 (Beta/Release) Build ID: 20140314220517 Steps to reproduce: While hacking on a single page app, I realized there is no way to read the HTTP headers from the initial page request within JavaScript?! I really need to know if the initial page request returned with a 200 or 404 or whatever for application-specific reasons. There are some workaround like https://stackoverflow.com/questions/220231/accessing-the-web-pages-http-headers-in-javascript doing a new XMLHttpRequest() but this is bad performance. I don't want to run a second request just to find this out. Why can't we access the web page's HTTP Headers in JavaScript right away after the first request? Probably there are historical reasons but it's 2014 now.
Reporter | ||
Updated•10 years ago
|
OS: Mac OS X → All
Hardware: x86 → All
Comment 1•10 years ago
|
||
Please propose a spec to either W3C or WHATWG first.
Reporter | ||
Comment 2•10 years ago
|
||
Yeah, I've been thinking of this too. Do you have an URL? And which one would you recommend first, W3C or WHATWG?
Updated•10 years ago
|
Component: Untriaged → DOM
Product: Firefox → Core
Comment 3•10 years ago
|
||
Michael, I'd recommend sending mail to whatwg@whatwg.org.
Updated•10 years ago
|
Summary: Unable to get the HTTP status code from JavaScript → Unable to get the HTTP status code for the page itself from JavaScript
Reporter | ||
Comment 4•10 years ago
|
||
Thanks Boris, will do. But I do not want to propose this alone. I need supporters, people who vote for this feature too. The more, the better. Is there anyone of you wanting this feature too?
Reporter | ||
Comment 5•10 years ago
|
||
Done, emailed to WhatWG - see how it goes! http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2014-May/296885.html
Comment 6•6 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046 Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5. If you have questions, please contact :mdaly.
Priority: -- → P5
Assignee | ||
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•