Saturday, February 25, 2023

Website loads slowly. What can be checked?

 

How HTTP client-server interaction works:

A Web server receives a request from a client for index.php page, for example, generates a page with static HTML content and sends to the client. This is Time to First byte (TTFB).

Then client web browser starts executing index.php: requests content mentioned in the page – various scripts, images etc. The scripts are delivered from the server and web browser starts executing them.

Possible causes
  • Slow DNS servers are used or dns servers reachability issues.
  • Server-side problems: web or MySQL service workload/bad optimisation.
  • Network problems: connection is not stable or bandwidth is not sufficient.
  • Site uses not optimal PHP version
  • Website code problems: content size and website code optimization.