1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-13 01:54:12 +02:00

Added an option for pre-loading of library assets. More info: https://web.dev/uses-rel-preload/

This commit is contained in:
Cameron
2020-12-02 13:17:23 -08:00
parent 594c6043db
commit c9bc789b79
5 changed files with 72 additions and 4 deletions

View File

@@ -713,6 +713,23 @@ class core_library
// Override library path.
'library_path' => '{e_WEB}lib/font-awesome',
'path' => '4.7.0',
// preload in header using <link> tag. for speed optimization.
'preload' => array(
0 => array(
'as' => 'style',
'type' => '',
'path' => 'css/font-awesome.min.css',
'crossorigin' => false,
'browsercache' => true, // add the generated ?xxxxxx to the path.
),
1 => array(
'as' => 'font',
'type' => 'font/woff2',
'path' => 'fonts/fontawesome-webfont.woff2?v=4.7.0',
'crossorigin' => false,
'browsercache' => false,
),
),
);