Chapter 8. Frontend SPOF in Beijing
I’m at Velocity China in Beijing as I write this article for the Performance Calendar. Since this is my second time to Beijing I was better prepared for the challenges of being behind the Great Firewall. I knew I couldn’t access popular U.S. websites like Google, Facebook, and Twitter, but as I did my typical surfing I was surprised at how many other websites seemed to be blocked.
It didn’t take me long to realize the problem was frontend SPOF (http://www.stevesouders.com/blog/2010/06/01/frontend-spof/)—when a frontend resource (script, stylesheet, or font file) causes a page to be unusable. Some pages were completely blank, such as Business Insider (http://www.businessinsider.com, Figure 8-1).
Firebug’s Net Panel shows that
anywhere.js is taking a long time to download
because it’s coming from
platform.twitter.com – which is blocked by the
firewall. Knowing that scripts block rendering of all subsequent DOM
elements, we form the hypothesis that
anywhere.js is being loaded in blocking mode in
the HEAD. Looking at the HTML source, we see that’s exactly what is
<!-- Twitter Anywhere -->
<!-- / Twitter Anywhere -->...
Figure 8-1. The dreaded “blank white screen” due to a blocking Twitter ...