4 ms·
Implementing above the fold optimizations is not nice for a frontend noob like me when using CSP. You can use a nonce or sha256 for style and script, but not fo
by tutanchamun 9y ago
Implementing above the fold optimizations is not nice for a frontend noob like me when using CSP. You can use a nonce or sha256 for style and script, but not for inline event handlers (onload="..."). Which means for now I have still a 'unsafe-inline' in my headers (which also works as a fallback for browser that don't support CSP2, and will be ignored by browsers that support nonce-/sha256). But it seems there will be a way in CSP3.
Ideally there would be a way to get async loading css without onload. Is putting the style tag just before </body> acceptable? It's not valid html if I remember correctly.
- tutanchamun 9y agoSince I can't edit anymore: I meant the link tag before </body>, not the style tag.