Feature #87756

preload CSS (loadCSS)

Added by Andreas Lochner 27 days ago. Updated 27 days ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2019-02-21
Due date:
% Done:

0%

PHP Version:
7.2
Tags:
Complexity:
Sprint Focus:

Description

Since you integrated defer and async for "includeJS" so well i would like to see the same feature for "includeCSS".

Somethink like the following:
includeCSS.file1 = /PATH/file.css
includeCSS.file1.preload = 1

Which generates a Link-Tag with rel="preload", an as="style" and onload="this.onload=null;this.rel='stylesheet'", like suggested here https://github.com/filamentgroup/loadCSS
The usage of <link rel="preload"> is supported by around 75% of the browsers (https://caniuse.com/#feat=link-rel-preload) and is highly recommended by Google (PagespeedInsights/Lighthouse).

In my opinion this should be integrated for single files and for concatenated files.

History

#1 Updated by Georg Ringer 27 days ago

  • Priority changed from Must have to Should have

Also available in: Atom PDF