KEMBAR78
Use img referrerpolicy attribute when fetching images by estark37 · Pull Request #1641 · whatwg/html · GitHub
Skip to content

Conversation

@estark37
Copy link
Contributor

@estark37 estark37 commented Aug 9, 2016

When initiating a fetch as part of the "update the image data" algorithm
for img, we should use the element's referrerpolicy attribute, if
present, to set the referrer policy on the request.

See #1531 and
w3c/webappsec-referrer-policy#40.

When initiating a fetch as part of the "update the image data" algorithm
for `img`, we should use the element's `referrerpolicy` attribute, if
present, to set the referrer policy on the request.

See whatwg#1531 and
w3c/webappsec-referrer-policy#40.
@estark37
Copy link
Contributor Author

estark37 commented Aug 9, 2016

@domenic how does this look to you?

source Outdated
<p>&#x231B; Set <var>request</var>'s <span>same-origin data-URL flag</span>.</p>

<p>&#x231B; If the element has a <code data-x="attr-img-referrerpolicy">referrerpolicy</code>
attribute, set <var>request</var>'s <span>referrer policy</span> to the current state of the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the first part should be removed; the state of the attribute is defined even when the attribute is not present.

@zcorpan
Copy link
Member

zcorpan commented Aug 10, 2016

Also need to add this to the algorithm "The user agent may at any time run the following algorithm to update an img element's image in order to react to changes in the environment."

Thank you!

@estark37
Copy link
Contributor Author

@zcorpan thanks! I removed the provision for an unset attribute and added the referrerpolicy to the other algorithm you mentioned.

@domenic
Copy link
Member

domenic commented Aug 10, 2016

This is perfect, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants