Project

General

Profile

Actions

Feature #87756

open

preload CSS (loadCSS)

Added by Andreas Lochner over 5 years ago. Updated almost 3 years ago.

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

0%

Estimated time:
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.

Actions

Also available in: Atom PDF