DEV Community

loading...

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

Collapse
clodder profile image
Lodder

1.6s is still pretty poor for a static site.

Collapse
saurabhdaware profile image
Saurabh Daware 🌻 Author

Yeah I'm still working on improving it :D
I'm just very proud about it since it has canvas animations a lot of colors, images etc. πŸ¦„

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 🌻 Author

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

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 🌻 Author

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