Closed
Bug 559092
Opened 15 years ago
Closed 3 years ago
Add priorities to XMLHttpRequest
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: smaug, Assigned: smaug)
Details
Attachments
(1 file, 1 obsolete file)
11.15 KB,
patch
|
Details | Diff | Splinter Review |
There is a proposal to add setPriority to XMLHttpRequest.
I think it makes sense, and would be easy to implement, AFAIK.
I do quickly a prototype implementation and a demo.
Assignee | ||
Comment 1•15 years ago
|
||
nsISupportsPriority in http channels doesn't seem to work quite the
way I was hoping :/
Assignee | ||
Comment 2•15 years ago
|
||
Or perhaps the problem is in my test
Assignee | ||
Comment 3•15 years ago
|
||
and my network connection is pretty fast
Assignee | ||
Comment 4•15 years ago
|
||
Assignee | ||
Comment 5•15 years ago
|
||
Actually, the wip works just fine.
http://mozilla.pettay.fi/xhr_upload/xhr_demo_with_priority.html
Start ~10 XHR, only 6 of them will start loading immediately.
Then the next ones will start based on priority.
Assignee | ||
Comment 6•15 years ago
|
||
By default don't change the priority.
Attachment #438800 -
Attachment is obsolete: true
Assignee | ||
Comment 7•15 years ago
|
||
I'm not yet sure whether this all should somehow take account priorities in
different tabs. Should background tab's "CRITICAL" be less critical than
in foreground tab.
Perhaps that kind of thing could be optimized later if needed.
Assignee | ||
Updated•15 years ago
|
Attachment #438963 -
Attachment description: v2 → wip, v2
Comment 8•14 years ago
|
||
Cross-linking the WebKit bug: https://bugs.webkit.org/show_bug.cgi?id=43400
Hopefully the IDLs will match up.
Assignee | ||
Comment 9•14 years ago
|
||
And because the feature isn't specified properly anywhere, moz and webkit prefixes should be used with constants and method.
Assignee | ||
Comment 10•14 years ago
|
||
I'll upload a new patch with prefixes.
Assignee | ||
Comment 11•14 years ago
|
||
Though, I'm not at all sure what version of the draft spec to implement.
I don't quite like using strings for the priority.
Comment 12•11 years ago
|
||
Hi,
For our WebGL application, we stream down hundreds of individual assets to load a scene. Some of these assets (skeletons, meshes, low-res textures) are far more important than others (high-res textures). In addition, some objects in a 3D scene are more important than others. Your own 3D character is more important than others. The room is more important than props in the room.
In our native applications, we have the ability to prioritize network traffic appropriately, but on the web, we don't. Being able to prioritize XMLHttpRequest would be a large improvement to our customer experience.
Thanks,
Chad
Assignee | ||
Comment 13•11 years ago
|
||
It sounds like WebSockets might work better for you, and have your own prioritization on top of the
API. That certainly would reduce the overhead of http.
Comment 14•11 years ago
|
||
We actually want HTTP so we can leverage CDNs, Varnish, and the browser's cache. All of our 3D assets are indexed by hash and thus infinitely cacheable, so, while pushing data with WebSockets might be an improvement on the initial load, it doesn't help at all for subsequent loads.
HTTP + priority would be perfect for this use case.
Comment 15•10 years ago
|
||
I wrote a blog post describing the use case and poor customer experience that results from not having a priority hint: http://chadaustin.me/2014/08/web-platform-limitations-xmlhttprequest-priority/
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
Assignee | ||
Comment 16•3 years ago
|
||
There is a proposal now to add priority to fetch() and to element which do resource loading. But XHR won't have it, since it is a bit legacy API.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•