DEV Community

Discussion on: JavaScript Tips to Improve Your Webpage Performance

explosion profile image

I disagree with "Avoid JS when possible". Server side rendered sites can be good, but they often take a long time to render before sending the page to you, while a skeleton loader is much more preferable. I do agree with it to an extent though, because using excess javascript can slow down the page. For animations and styles it's a lot better to skip JS altogether, but don't go to crazy with the "ONLY CSS" stuff. For me the best way to build a site is through something like Nuxt.js, which statically generates your site. Making it lightning fast.

lukeshiru profile image

Take a look at Astro or Remix, that's the type of tool I think of when I say "avoid JS when possible". They keep JS to a minimum, do a lot of SSR and they are blazing fast compared to any SPA.