-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve "initiator" reporting #8
Comments
I'm assuming you're using XHR to invoke the upload - correct? Is there any reason why you can't instrument the upload logic to get the method and/or any other variables from the request object itself? |
The only XHR request I am making is a |
On further thought.. I think this a subset of multi-request case that we need to address, see: https://lists.w3.org/Archives/Public/public-web-perf/2015Feb/0059.html |
@igrigorik that looks great and handles lot of cases. It still doesn't resolve this issue completely. Two thing If I am doing multiple I can potentially end with an odd numbers of timing entries and I can't distinguish which ones are preflight. Here is another thought, the spec could explain I still feel adding |
The behavior you're describing is correct: browsers cache CORS permissions responses to avoid having to send an OPTIONS request for each cross-origin fetch. Hence the "odd" number of requests. That said, you're right, just "name" and "nextName" may be insufficient when you have multiple app-level requests against the same URL. We may need to introduce some concept of a request ID. Last but not least, I actually really like IE's behavior. I think we should take that to the mailing list and see if we can put that in the spec. The combination of initiator + request ID would address all of the above issues. |
|
Discussed on perf call (26/08/15): @toddreifsteck to followup with list of initiators implemented in Edge. |
Here is the list of currently implemented Microsoft Edge initiatorTypes. link: link requests |
@toddreifsteck thanks! Looking at the list, RT's current definition covers:
Also, we don't have a definition for fetch().. seems like something we need to as well. Any other cases we're overlooking here? |
Agreed on preflight and fetch. Unclear that adding subdocument or iframe to spec has clear value. |
- 'fetch' for fetch() initiated requests - 'preflight' for CORS-preflight requests - 'other' to catch all other cases closes #8
Should this be closed in favor of #39 ? |
Hmm, probably not. Fetch initiator [1] is not granular enough for our purposes, we'll have to maintain some of our own logic. And, if we agree on that, than we don't need to block on #39. |
We at Vimeo are working on uploading straight to Google Cloud Storage. Occasionally I notice OPTIONS requests taking a long time to respond (10-30 sec).
Here is one example: https://gist.github.com/vayam/d752cf31eeedc4849766#file-gistfile1-txt-L2164
I would like to log OPTIONS request timings so I can report to Google Cloud support. Unfortunately, the HTTP method is not recorded in the resource timing spec. Right now I can't distinguish b/w PUT vs OPTIONS.
From the spec
The name attribute must return the resolved URL of the requested resource.
I propose adding
method
attribute to it.I would like to hear your feedback on this.
/cc @toddreifsteck
The text was updated successfully, but these errors were encountered: