vitepress
vitepress copied to clipboard
Preloading critical style-sheets for improved performance 🚤
This is inspired from Next.js
.
Preload critical stylesheets to improve loading speed.
Sorry if I made any mistakes :(
@brc-dd I use this, LGTM: for example, I also apply some non blocking trick to css resources: https://github.com/vitest-dev/vitest/blob/main/docs/.vitepress/scripts/assets.ts#L40
@sanjaiyan-dev I use this with Link header (server side) to allow the browser to load some resources fast (before browser starts parsing the html)
@brc-dd I use this, LGTM: for example, I also apply some non blocking trick to css resources: https://github.com/vitest-dev/vitest/blob/main/docs/.vitepress/scripts/assets.ts#L40
@sanjaiyan-dev I use this with Link header (server side) to allow the browser to load some resources fast (before browser starts parsing the html)
Hi,
So it is already implemented in vitepress ?
So it is already implemented in vitepress ?
I think no, I should check the code... (my link is from Vitest docs)
So it is already implemented in vitepress ?
I think no, I should check the code... (my link is from Vitest docs)
Ohh ok sorry, yh if adding with the header we can use new early hint
headers.
@brc-dd I use this, LGTM: for example, I also apply some non blocking trick to css resources: https://github.com/vitest-dev/vitest/blob/main/docs/.vitepress/scripts/assets.ts#L40
@sanjaiyan-dev I use this with Link header (server side) to allow the browser to load some resources fast (before browser starts parsing the html)
Sorry if I am wrong, in SSG generation I thought better to add link
tag than adding header :)