fronteers / website

New website for Fronteers
https://www.fronteers.nl
MIT License
16 stars 17 forks source link

Cache busting (Was: Some questions/remarks after viewing the source code) #382

Open bnijenhuis opened 1 week ago

bnijenhuis commented 1 week ago

Not sure where to put this, so I figured this was the best place (because 'Discussions' isn't used). I was just looking at the source code of the homepage, and I have some questions:

To be clear, this is not meant as criticism, although it could come over as such. I haven't been involved in implementing everything, so it's not my place to criticize, but I was just wondering what the reasoning is behind some choices. Or maybe it was just overlooked.

anneke commented 1 week ago

Hey Bernard, not taking it as criticism (of the bad kind), we just want a good end product! If you see anything funny that you know how to fix, your help is very welcome!

anneke commented 1 week ago

@bnijenhuis Can you check this for me? :) https://github.com/fronteers/website/pull/383

SleeplessByte commented 1 week ago

If you want the font to preload, they cannot go. The cache busting thing is causing a FOUC. Disabling JavaScript fixes this.

bnijenhuis commented 1 week ago

@SleeplessByte The -tags for the fonts should handle the preload, right? Not an inline style with the font declarations? Correct me if I'm wrong.

The cache busting thing is (as I understand) a temporary JS "hack", and is going to be replaced or removed.

SleeplessByte commented 1 week ago

@bnijenhuis do you mean the @font-face declarations? No those do not preload the font. Only <link rel="preload"> (or Link headers) can preload fonts.