support preload on font element
Our client got a Lighthouse report on their AEM site, the reports pointed out some performance issues caused by font files(*.woff2) files being loaded slowly, here is the suggested method to fix:
| Consider using '<link rel=preload>' to prioritize resources that are currently requested later in page load |
However as font files are referenced by css, which is included in clientLib, the OOTB method of including clientLib does not allow us to add "rel=preload" into source code, I am wondering what is the best approach.
I tried adding hard-coded lines to preload font files directly by updating template file, however, the new Lighthouse report pointed out that the preloaded file was not used by the browser.
How to handle the request of adding "preload" to improve performance
