I was hoping if anyone knew how Etherscan loads its landing page. For instance, the landing page displays the blocks and transactions almost immediately upon entering the page. How is the webpage able to query the chain and get the response so fast?
To query the Ethereum chain you have three options:
- Run your own Ethereum node, fully synchronized with the chain => it's fast but this will be expensive to maintain and take a lot of time to set-up
- Use a service like Infura => it's cheap, fast to use but may not be the most accurate as there will be delay between you and the request to Infura
- Use a mix of the two above, through a service like Quiknode.
Etherscan is very likely to go with option one of running and managing their own Ethereum node to get the latest and most accurate data in the fastest time.