thomersch/openstreetmap-calendar

Question: Is SourceSansPro intentionally preloaded?

Closed this issue · 5 comments

Browser: Chrome

Dev console
image

Yes, it is. Though I am not sure whether that's a wise decision. Preloading can decrease load time, because those assets requests are multiplexed over http/2.

Do you have Source Sans Pro installed on your system? Because then the system one is picked why this message might pop up. Initially I added this mechanism to reduce transfer size if you already got the font, but then I added preload which defeats the purpose of the first mechanism.

Tangentially, I am always a bit torn about custom fonts: They are quite large, thus dragging the first load down. On the other hand, the default fonts on some environments are truly awful, and I want to have more control here.

Doesn't look like it's installed on my system. I can see the text just fine btw.

Now also mentions request credentials
image

I can't make any sense from cross origin. It's coming from exactly the same domain. Also, I cannot reproduce it. Are you running some plugins that might interfere?

The complaint about the preload stuff only appears in Chrome, so I am a bit reluctant to change anything.

Are you running some plugins that might interfere?

No. I don't have any issues seeing the text or font afaik, I only noticed I got these warnings in the dev console. This is what the site looks like for me (high dpi, can always cause issues ofc).

image
image

Apparently, the w3c mandates the crossorigin attribute on preloaded fonts, but Chrome seems to enforce this even for same-origin sources. From my reading, the specification mandates this only for CORS, but since this was an easy workaround for Chrome, I quickly pushed this out: 7b39115