Problem loading font preloads with query cache bust parameter

Created on 25 March 2024, 9 months ago
Updated 26 April 2024, 8 months ago

Problem/Motivation

We have a nice `preload-fonts` feature for fonts and icon fonts.

The problem is when preload font url has query parameter for cache busting - can happen for generated font icons for example. In this case type of generated link tag will have query parameter which will cause browser to report next error:

<link rel=preload> has an unsupported `type` value

Also generated href url will change because `\Drupal::service('file_url_generator')->generateString($uri)` will append `=` character to the end. This will cause duplicated font preloading because resource urls are different.

🐛 Bug report
Status

Fixed

Version

1.0

Component

BS Base

Created by

🇷🇸Serbia pivica

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024