Gather telemetry on cross-origin style sheet Content-Type headers
Categories
(Core :: DOM: Core & HTML, enhancement, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox71 | --- | fixed |
People
(Reporter: annevk, Assigned: valentin)
References
(Blocks 1 open bug)
Details
(Whiteboard: [sp3])
Attachments
(2 files)
47 bytes,
text/x-phabricator-request
|
mlopatka
:
data-review+
|
Details | Review |
2.32 KB,
text/plain
|
valentin
:
data-review?
|
Details |
Currently anything lacking a Content-Type header or having a Content-Type header that cannot be parsed, can be used as a cross-origin style sheet. It would be good to know to what extent such resources exist.
Ideally we log all Content-Type header values (or the lack of the header).
Reporter | ||
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Reporter | ||
Comment 1•5 years ago
|
||
For this particular part of CORB++ it would be good to get telemetry sooner rather than later because if we cannot enforce text/css for style sheets we will have to rethink the design.
Comment 2•5 years ago
|
||
Dave, would it be possible to add telemetry for this?
Comment 3•5 years ago
|
||
The relevant place to add this telemetry is presumably at https://searchfox.org/mozilla-central/rev/878bbf3cb8897a208454df27535f3522ab482cf2/netwerk/protocol/http/nsHttpChannel.cpp#1821-1824 in the case when mContentTypeHint is "text/css" (or the loadinfo type is TYPE_STYLESHEET; those should be pretty equivalent, modulo XSLT). As in, this would need to be done in networking code; by the time the style loader sees things it just sees "text/css" for these sorts of loads.
Updated•5 years ago
|
Assignee | ||
Comment 4•5 years ago
|
||
It seems that we can use Telemetry::RecordEvent
to record arbitrary contentType strings.
I'll write up a patch ASAP.
Comment 5•5 years ago
|
||
That's definitely going to need a data review...
Reporter | ||
Comment 6•5 years ago
•
|
||
I think we need to measure 4 things initially which are hopefully fine without data review. For a cross-origin style sheet:
- 1) Are there Content-Type headers?
- Is the result of extracting a MIME type (and ignoring MIME type parameters) from the Content-Type headers 2) failure, 3) text/css, or 4) another MIME type?
(In particular ideally we do not equate lack of Content-Type headers or failure to parse them with text/css.)
Comment hidden (obsolete) |
Assignee | ||
Comment 8•5 years ago
|
||
Assignee | ||
Comment 9•5 years ago
|
||
Comment 10•5 years ago
|
||
Comment on attachment 9098502 [details]
request.md
Load balancing to Martin.
Comment 11•5 years ago
|
||
Thanks for the data review request. I'd like to request clarification on one item.
- List all proposed measurements and indicate the category of data collection for each measurement, using the Firefox data collection categories on the Mozilla wiki.
Whether cross-origin stylesheet responses had a Content-Type, if it was successfully parsed, and if it parsed as text
It seems to me that these values can all be encoded as Boolean types.
Can you please specify the data collection schema for these three measurements:
- presence/absence of a cross-origin stylesheet
- presence/absence of a Content-Type in the responses
- Boolean specifying that the Content-Type (if present) was parsed as text True/False
Furthermore, at what level of aggregation will these values be reported?
Assignee | ||
Comment 12•5 years ago
|
||
(In reply to mlopatka from comment #11)
Thanks for the data review request. I'd like to request clarification on one item.
- List all proposed measurements and indicate the category of data collection for each measurement, using the Firefox data collection categories on the Mozilla wiki.
Whether cross-origin stylesheet responses had a Content-Type, if it was successfully parsed, and if it parsed as text
It seems to me that these values can all be encoded as Boolean types.
Can you please specify the data collection schema for these three measurements:
- presence/absence of a cross-origin stylesheet
- presence/absence of a Content-Type in the responses
- Boolean specifying that the Content-Type (if present) was parsed as text True/False
These are all represented as a categorical probe with these categories:
"NoHeader", "EmptyHeader", "FailedToParse", "ParsedTextCSS", "ParsedOther"
Furthermore, at what level of aggregation will these values be reported?
Not sure if reporting the data as a categorical probe counts as aggregation or not.
From what I understand we will not be aggregating the data with any other probes.
Comment 13•5 years ago
|
||
Thank you for the clarification.
Data review r+
Assignee | ||
Comment 14•5 years ago
|
||
Thanks for the review!
Comment 15•5 years ago
|
||
Pushed by valentin.gosu@gmail.com: https://hg.mozilla.org/integration/autoland/rev/fcf12f6e3f64 Gather telemetry on cross-origin style sheet Content-Type headers r=JuniorHsu
Comment 16•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Updated•5 years ago
|
Reporter | ||
Comment 17•3 years ago
|
||
For future reference and whoever is interested, the results of these measurements are noted and analyzed in https://github.com/whatwg/fetch/issues/964.
Updated•1 year ago
|
Updated•1 year ago
|
Description
•