yireo / Yireo_LinkPreload

Magento 2 extension to set HTTP Link headers for primary resources to allow for HTTP/2 Server Push
Open Software License 3.0
74 stars 18 forks source link

Font files... #9

Closed n2diving-dgx closed 7 years ago

n2diving-dgx commented 7 years ago

Doesn't appear to detect fonts, which would seem to be a great candidate for server push.... in particular we are using woff2 fonts... content-type: application/font-woff2

yireo commented 7 years ago

How are the font files added to your HTML document then? Through XML layout?

n2diving-dgx commented 7 years ago

Currently using css @font-face to load the fonts.

yireo commented 7 years ago

I don't think that there is another technique than CSS to load fonts. So what you meant is something that can not be decided through the HTML document in the first place. Unfortunately, it makes it impossible to create. The only thing that could be done is create custom code to do this, based on the custom files that are going to be loaded. Unfortunately we can't include that in a standard extension.