-
Notifications
You must be signed in to change notification settings - Fork 9
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
Should Sec-CH-Width be sent when the sizes attribute is not present? #19
Comments
Right now the use case for The most common reason If Pros
Cons
On first read, the pros outweigh the cons; I'll file a Blink issue. |
I'm concerned about this. At the same time, I think that if we're reconsidering this, it makes sense to also reconsider setting the right |
@yoavweiss You're suggesting tying this work to progress on whatwg/html#4654 ? In a perfect world, that issue will be fixed by some mechanism that updates the "source set’s current source size," and the language here will end up just as it is now. In the meantime, do you think it's a good idea to update the language here to make the sending of In general, I'm leaning towards models that are easier to understand/predict for authors, over models that offer servers maximum knowledge and flexibility. As such, I moderately prefer making this work just like srcset/sizes. But I could be convinced. |
I am suggesting that. I think that
I think the model is easy to understand: when
I agree and think there's no contradiction here. We need to automatically calculate |
Oh, totally agree. I think what's confusing is that I think we're largely on the same page, as far as where the puck is heading. I think this spec is already where it needs to be: Right now, per HTML:
And per this spec:
Source size calculation (in HTML) can get smarter, without affecting this spec. The issue at hand is that Chrome's implementation doesn't send
Accurate? |
Yeah, that's accurate. The reason Chromium doesn't currently send If this reasoning is flawed, than we could move on one aspect of the problem before moving on the other. (even if I'd prefer to look at it holistically) |
In general I think it's a good idea for the user-agent to send My opinion is that The Con outlined above is a very big con, imo. A UA with a high DPR would then request a huge image from image cdns (at least that's how ImageEngine works). A trend I observe is that DPR is "capped" at some level, simply because a 4x image does not have additional value compared to the 2x variant. So the ability for devs, or image cdns, to make decisions based on variables (hints) with a single meaning is crucial. |
So given:
I did my best. Reviews welcome! If we agree on this approach, I can whip up a Web Platform Test and try to make sure Chrome's in-progress implementation passes before it ships. |
whatwg/html#4654 means that lazyload scenarios get automatic
Hopefully this represents the largest-possible intrinsic size of the image, and (more importantly) combines with
I get that. What's cleaner from a spec perspective isn't always easier for developers using the spec to understand. How does the PR look to you? |
We state that:
Some facts:
<img>
elements have an associated source-sizesizes
attributesizes
attribute is absent, the source-size is 100vwWidth
hint when there is nosizes
attribute present on the image.Should Chrome change, or should the spec?
The text was updated successfully, but these errors were encountered: