incubator-pagespeed-mod
incubator-pagespeed-mod copied to clipboard
Prioritize Critical CSS strips leading / from asset urls
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
Have you tried to put absolutes url's?