bellroy / lesswrong

Less Wrong platform
http://lesswrong.org/
Other
45 stars 23 forks source link

Slow loading synchronous javascript delays load of frontpage sidebar #494

Open frediy opened 9 years ago

frediy commented 9 years ago

From kevin.pa...@gmail.com on July 30, 2013 17:07:01

What steps will reproduce the problem? 1. Visit lesswrong.com

  1. s18.sitemeter.com is slow, for whatever reason What is the expected output? What do you see instead? I expect to see the side bar populated with recent posts and comments, etc. Instead, it is empty for a long time before loading. (55 seconds in the incident that prompted me to post this). What version of which web browser are you using? On what operating system? Chrome 27 on OSX 10.8 Please provide any additional information below. I poked around in chrome's dev tools a bit. It looks like the sidebar is populated by some javascript that runs on the window.onload event. This therefore won't run until every resource is downloaded, and so when even a fairly inconsequential piece of javascript like that sitemeter is slow to load, the sidebar content is too. The solution should be as simple as adding async="true" to that script tag, assuming that it doesn't do something strange.

Original issue: http://code.google.com/p/lesswrong/issues/detail?id=397

frediy commented 9 years ago

From wjmo...@gmail.com on July 30, 2013 15:55:31

Status: Accepted