Gmail’s fake loading indicator (2020)
Progress bars are inherently difficult to create since you need to predict the future to provide an accurate status on progress.Let's just consider what would factor into an accurate status bar. Gmail would need to know in advance:1. the total payload size (which is different for everyone since some might have locally cached assets and everyones inbox size is different)2. would need to know # of assets to be downloaded by the user (since # of assets, not just file size, affects load time)3. how fast your computer will render the webpage (different processors, browsers, versions, etc all affect load time)4. how fast is your internet connection and pack loss (more pack loss on mobile networks, etc)5. is there any blocking content on the page that will affect delaying "first paint". (Why things like Lighthouse exists)And many more factors.This is unneeded complexity when instead, you can just display an animation to distract the user while the page loads.This is 100% a K.I.S.S.