DEV Community

Discussion on: I rebuilt my portfolio🌻 Now it loads in 1.6s πŸŽ‰ Here's how I did

Collapse
 
clodder profile image
Lodder

I personally use Javascript to load all JS/CSS files asynchronously. With the Joomla CMS powering my site and on SiteGround hosting (pretty bad TTFB times), I can manage 0.8s for first interactive

Thread Thread
 
saurabhdaware profile image
Saurabh Daware 🌻

I am loading them asynchronously too. In fact I'm preloading them and applying them when they are loaded that should be faster than straight up loading them. Is there anything extra you're doing? Would you like to share your website?

Thread Thread
 
clodder profile image
Lodder • Edited

This is what I wrote to properly asynchronously load JS gist.github.com/C-Lodder/a00cf9894...

You can use it for CSS too. My main template CSS I'm loading inline as I wrote my own mini framework and it's only 22kb

Alt text of image

Thread Thread
 
saurabhdaware profile image
Saurabh Daware 🌻

that looks interesting I have async attribute true in my script link, I'll do some research. Thanks for sharing! the performance insights are pretty crazy :D