-
Notifications
You must be signed in to change notification settings - Fork 61
Allow to use ‘as’ attribute on HTML ‘link’ element #138
Conversation
‘as’ attribute can be used as additional hint for the browser when preloading resources. This patch allows to use the ‘as’ attribute by HeadLink helper.
@froschdesign, do you think that a unit test similar to https://github.com/zendframework/zend-view/blob/master/test/Helper/HeadLinkTest.php#L437-L444 would be enough? |
@gscscnd
The preload links are still work in progress. (Working Draft 2017-08-30) We leave the issue open and add the label "WIP". |
Ok, thank you for the explanation. |
Right! |
src/Helper/HeadLink.php
Outdated
@@ -51,7 +51,8 @@ class HeadLink extends Placeholder\Container\AbstractStandalone | |||
'extras', | |||
'itemprop', | |||
'crossorigin', | |||
'integrity' | |||
'integrity', | |||
'as' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a comma after 'as'
.
@froschdesign I need it too! rfc5988 is not in draft stage anymore (candidate). If browsers started implementing this feature, we should provide it too IMO. |
@gscscnd
You can always extend the view helper or write your own. This allows you to use the attribute now.
Do you have a status overview which includes this new attribute? Thanks! |
You’re right, I can always use my own view helper. About browser compatibility you can see it here |
Next step is reached: "HTML 5.2 - W3C Recommendation, 14 December 2017" |
Final step is reached: "HTML 5.2 is done" This feature will be added with the next minor release. When? I don't know. At the moment I work on some other tasks / issues. I will try to clarify this. Thanks for your patience! |
Any news on this? "as" is a critical part of the HTTP/2 Server Push via Apache http2 module. |
Allow to use ‘as’ attribute on HTML ‘link’ element
Thanks, @gscscnd; merged to develop for release with 2.10.0. |
This patch allows to use the
as
attribute by theHeadLink
helper.Citing from MDN: