1

Various tools (Google Lighthouse, PageSpeed, etc.) suggest preloading key requests via <link rel=preload> to increase web site performance. For static files whose filename is known and does not change everything is clear. However, how can I specify a versioned file (https://www.example.org/primeicons.e12e3d4e5dfc6a78e9ee.ttf) with changing filenames in the link with the preload hint? In my specific case, it is the PrimeIcons font from PrimeNG.

ThirstForKnowledge
  • 1,245
  • 1
  • 10
  • 27

1 Answers1

0

In the absence of working alternatives, I finally changed the value of the outputHashing attribute from all to bundles in the angular.json file, and additionally included <link rel="preload" href="primeicons.ttf" as="font" type="font/ttf" crossorigin> in the <head> section of index.html.

For the assets, which are served without hash now, this may cause a cache issue after re-deploys in production, but I can personally accept that.

ThirstForKnowledge
  • 1,245
  • 1
  • 10
  • 27