Follow these commandments and your website will not be remembered as slow.
Infographic
Text form
- You shall never put shiny, bloated frameworks above your user's experience.
- You shall always try to use native features before you reimplement them in JavaScript.
- You shall use lazy loading whenever it can be used within reason.
- You shall always serve images compressed and in the correct format.
- You shall regularly test your website performance and fix issues as they arise.
- You shall split JavaScript code to load what is needed when it is needed.
- You shall serve web fonts in the proper format.
- You shall always use a CDN for assets.
- You shall do your due diligence when using dependencies making sure you are choosing the right one for the job.
- 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.
Top comments (5)
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 :)
Latency, latency, latency!!! 🙃
True, true. ;)
I really don't like lazy loading images as a user.
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).