DEV Community

Cover image for The Ten Commandments of Web Performance
Paweł Kowalski for platformOS

Posted on • Edited on

15 7

The Ten Commandments of Web Performance

Follow these commandments and your website will not be remembered as slow.

Infographic

Alt Text

Text form

  1. You shall never put shiny, bloated frameworks above your user's experience.
  2. You shall always try to use native features before you reimplement them in JavaScript.
  3. You shall use lazy loading whenever it can be used within reason.
  4. You shall always serve images compressed and in the correct format.
  5. You shall regularly test your website performance and fix issues as they arise.
  6. You shall split JavaScript code to load what is needed when it is needed.
  7. You shall serve web fonts in the proper format.
  8. You shall always use a CDN for assets.
  9. You shall do your due diligence when using dependencies making sure you are choosing the right one for the job.
  10. You shall spread the word of performance amongst both technical and non-technical people.

Bonus: Always code as if the person who ends up maintaining your code is a violent psychopath who knows where you live.

Read more

If you are interested in more performance oriented content, follow me and I promise to deliver original, or at least effective methods of improving your website.

Do your career a big favor. Join DEV. (The website you're on right now)

It takes one minute, it's free, and is worth it for your career.

Get started

Community matters

Top comments (5)

Collapse
 
duomly profile image
Duomly • Edited

Great points and article, thanks for sharing!

I would add AMP and static generators to fulfill the list, and achieve more performance.
You can read about it In this Dev.to post :)

Collapse
 
kayis profile image
K

Latency, latency, latency!!! 🙃

Collapse
 
pavelloz profile image
Paweł Kowalski

True, true. ;)

Collapse
 
umutakyol profile image
asdsadasf

I really don't like lazy loading images as a user.

Collapse
 
pavelloz profile image
Paweł Kowalski

Well, as a user, you shouldnt even notice it. If you see it, its either implemented not good enough, or you have very slow connection (which should benefit from lazy loading, because more important stuff could be stuck behind whatever is lazy loaded).

This post blew up on DEV in 2020:

js visualized

🚀⚙️ JavaScript Visualized: the JavaScript Engine

As JavaScript devs, we usually don't have to deal with compilers ourselves. However, it's definitely good to know the basics of the JavaScript engine and see how it handles our human-friendly JS code, and turns it into something machines understand! 🥳

Happy coding!

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay