Have you even asked yourself what happens behind the scenes when you enter a website’s URL address in the browser and press Enter?
All websites contain a lot of assets that need to load in order for a website to look good, be functional and ready for you to interact with, some of these assets can be:
- CSS files
So in order for a website to load, it need to load all these assets in a fast way, in order to please its visitors. Nowadays, fast means a matter of seconds (1-2 seconds), a few seconds more and your visitors will stop entering your website, SEO engines will give your web pages a poor ranking and so on.
The are situations when websites keep loading forever, and this may be caused by various issues:
- a 3rd party widget (customer support, analytics, marketing, email) is not loading properly
- your server where your website is hosted is not able to cope with the load
- the web server is slow
- too many visitors (this would be a nice problem to have)
- the APIs are not responding to your requests,
- the Database queries are pending
- the CDN where you host your static assets is not responding
- your website is not optimised to load the minimum assets for your website
- and others depending on your hardware infrastructure, location, architecture stack etc
So, when your try to load a website, and the loading spinner is not stopping, there are a lot of potential bottleneck you’d have to consider. You can run a free website speed test and get more insight on the potential problems and try to debug what’s really happing with the loading time of a specific website.
Thanks for reading. I hope you learned something interesting about React!
If you found this article useful, please share it with others. Don’t forget to subscribe to get notified for the upcoming articles.