Conversation
supportHi, I use this tehnique to add a transition when the page loads, but the speculative rules cause the CSS to be preloaded and the transition doesn鈥檛 work. My question is, is it possible to exclude a specific CSS file to rule out this issue?
You would need to use a technique like this: https://developer.chrome.com/docs/web-platform/prerender-pages#hold-back-other-content This example is for a script tag, but the same technique could be used for a <link rel=stylesheet> tag.
Thank you, so as I understood it, the only way is to add the CSS file via JS?
Correct. The other alternative is to use prefetch rather than prerender.
I understand and thank you very much for the explanation 馃檪
And perhaps a better way to do this page load transition is to instead use the newly-supported cross-document view transitions now available in Chrome and Edge. This reply was modified 1 year, 11 months ago by Weston Ruter .
@westonruter Thanks for the tip 馃檪 I鈥檒l look into it.
You would need to use a technique like this: https://developer.chrome.com/docs/web-platform/prerender-pages#hold-back-other-content This example is for a script tag, but the same technique could be used for a <link rel=stylesheet> tag.
Thank you, so as I understood it, the only way is to add the CSS file via JS?
Correct. The other alternative is to use prefetch rather than prerender.
I understand and thank you very much for the explanation 馃檪
And perhaps a better way to do this page load transition is to instead use the newly-supported cross-document view transitions now available in Chrome and Edge. This reply was modified 1 year, 11 months ago by Weston Ruter .
@westonruter Thanks for the tip 馃檪 I鈥檒l look into it.