What we Focus Today
Want website look like faster?provide visual feedback faster? load DOM first! put javascript and css file at the bottom
we can make website loading faster by changing a lot thing.Such as Minimize HTTP Requests,Use a Content Delivery Network.......(want more? go to Best Practices for Speeding Up Your Web Site)
But today,we just do some little trick, let user feel faster.
So how to do that? we just put our external link(like css or javascript) at the bottom of file.After that, the browser will load the DOM fist, then it load external file.When we do that,user can get response as soon as possible. Otherwise,browser load javascript file,css first, it require a lot of time(as CDN network may be down, file is too big).
the philosophy behind that ,when user browse website, what they can see? just html page, CSS? javascript? they can can't "see".
HTML page is the progress indicator! When the browser loads the page progressively the header, the navigation bar, the logo at the top, etc. all serve as visual feedback for the user who is waiting for the page. This improves the overall user experience. by Best Practices for Speeding Up Your Web Site
0 comments:
Post a Comment