Skip to Content
Web Performance Daybook Volume 2
book

Web Performance Daybook Volume 2

by Stoyan Stefanov
June 2012
Intermediate to advanced content levelIntermediate to advanced
226 pages
5h 5m
English
O'Reilly Media, Inc.
Content preview from Web Performance Daybook Volume 2

Chapter 8. Frontend SPOF in Beijing

Steve Souders

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.

Business Insider

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 happening:

<head>
...
<!-- Twitter Anywhere -->
<script src="https://platform.twitter.com/anywhere.js?id=ZV0...&v=1"
        type="text/javascript"></script>
<!-- / Twitter Anywhere -->
...

</head>

<body>
The dreaded “blank white screen” due to a blocking Twitter script

Figure 8-1. The dreaded “blank white screen” due to a blocking Twitter ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Jump Start Web Performance

Jump Start Web Performance

Craig Buckler
High Performance Mobile Web

High Performance Mobile Web

Maximiliano Firtman
Back-end Performance

Back-end Performance

Bruno Skvorc, Christopher Pitt, Tonino Jankov, Reza Lavaryan, Daniel Berman

Publisher Resources

ISBN: 9781449337667Catalog PageErrata