Skip to content
loading...

How to speed up your website?

twitter logo github logo ・1 min read  

Here are a few options I suggest:

  1. By serving the static media off a separate subdomain (e.g. static.yourservice.com) using a lightweight HTTP server like Nginx.
  2. By using Content Delivery Network.
  3. If the system is large we can leverage Load Balancing.
  4. By levering browser caching.
  5. By optimizing images.

Developers, please suggest or add some other good points I'm missing... 🤔

twitter logo DISCUSS (4)
markdown guide
 
  1. Make it PWA using service worker. Let it cache everything and make your website work even in offline mode!
  2. Use Lighthouse and GTMetrix to see what's missing and what's hindering your website's performance.
  3. If you cannot speed up your website, just make users feel like it's fast. Follow Lighthouse advises.
  4. BTW, don't use next gen image formats because Apple users will hate your website in no time. (There are some workarounds for this.)
  5. Don't use loaders when loading pages, use skeletons for better user experience!

There must be more than these in my memory. But these are all I can think of right now.

 

This is one great piece of advice. I really liked the concept of the Progressive Web Application you mentioned.

But why not use loaders when loading pages?

 

Thanks for your attention. Loaders will prevent users from tampering until all the data is fetched and buttons can start working safely. However, stopping users to interact with your website like this is really a bad approach. Google Lighthouse has some rules and algorithms to measure first image loading time, first meaningful content and time to take for users to fully interact with your website. Blocking entire section or page with loaders is absolutely against their rule. Just see how major companies (FB, Twitter, Medium, ❤️DEV❤️) deal with this problem. They're kindly showing skeletons (🤣🤣🤣) until the page is fully loaded and able to start working. In this way, users can see at least the whole structure of the website and you can distract them with other static contents until all the data is fetched. Happy coding!

 

Oh, and another advice is to use mod_deflate.c. You can compress static files with it.

Classic DEV Post from Dec 14 '19

Python coders, what are some exercises/activities that help you quickly get better at the basic coding?

mayank joshi profile image
I love system design and most of the time I find myself learnign or designing one of them.