Skip to content
This repository was archived by the owner on Apr 10, 2025. It is now read-only.
This repository was archived by the owner on Apr 10, 2025. It is now read-only.

Prioritize Critical CSS strips leading / from asset urls #2092

@azt3k

Description

@azt3k

I have font face references in my css that look like this after optimisation:

@font-face{font-family:helvetica-black;font-weight:400;font-style:normal;src:url(/resources/font/helvetica-black/5ba229ac-ba95-456c-9c0d-9e10cc8de8d6.eot);src:url(/resources/font/helvetica-black/5ba229ac-ba95-456c-9c0d-9e10cc8de8d6.eot?#iefix) format("eot") , url(/resources/font/helvetica-black/8ede94c2-af21-4381-92e8-e40c05f98715.woff2) format("woff2") , url(/resources/font/helvetica-black/4550aa51-8a1d-40f2-a8c3-13384b0bb1e2.woff) format("woff") , url(/resources/font/helvetica-black/e9b5da31-e566-4f36-a41f-31b1101a16b5.ttf) format("truetype")}

These are fine in the optimised css file, however when critical css is prioritised it removes the leading / from the urls which breaks them on sub pages:

@font-face{font-family:helvetica-black;font-weight:400;font-style:normal;src:url(resources/font/helvetica-black/5ba229ac-ba95-456c-9c0d-9e10cc8de8d6.eot);src:url(resources/font/helvetica-black/5ba229ac-ba95-456c-9c0d-9e10cc8de8d6.eot?#iefix) format("eot") , url(resources/font/helvetica-black/8ede94c2-af21-4381-92e8-e40c05f98715.woff2) format("woff2") , url(resources/font/helvetica-black/4550aa51-8a1d-40f2-a8c3-13384b0bb1e2.woff) format("woff") , url(resources/font/helvetica-black/e9b5da31-e566-4f36-a41f-31b1101a16b5.ttf) format("truetype")}

trim urls is not enabled

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions