Load the Like box and Tweet button after the page itself, move them below the main content, and test the site with Facebook and Twitter blocked, the way an office firewall blocks them.

Fast at home, frozen at work

A customer mentions that your website freezes when she opens it at work. The logo and menu appear, then nothing for half a minute or more, and sometimes the page never finishes.

At home the same evening, it loads at once. No one else has complained, and when you try it from your own office, it is fine.

The difference is her office network. It blocks Facebook and Twitter, and every page of your site starts by asking both of them for something.

What the browser is waiting for

The Like box and the Tweet button are not part of your site. Each is a small program loaded from Facebook's or Twitter's servers, and your pages include a line of code asking for it.

A browser builds a page from the top down. When it meets an ordinary script, it stops building the rest of the page until the script arrives or the request fails.

Placed in the header, those lines hold up the article, the prices and the contact details below them. On a normal connection the wait is too short to notice.

Who sits behind a block

Plenty of networks block social sites on purpose, and their users are often the visitors a business most wants:

The first group matters most to any business that sells to other businesses. Its customers browse at their desks, in working hours, behind exactly this kind of filter.

Why the wait is so long

A network can block a site in two ways. It can refuse the request at once, so the browser moves on, or it can drop the request without a word.

When the request is dropped, the browser has no answer to act on. It waits until it gives up, which can take many seconds, and only then builds the rest of the page.

Two buttons can mean two waits, one after the other. To the visitor the site looks broken, and few wait for it to recover.

A worked example

A Cranbrook company that installs business phone systems sells and services them for law firms, accountants and car dealerships across the East Kootenay.

Its site had a Like box and a Tweet button in the header of every page, added when the site was built. An office manager at a law firm told the installer the site was broken.

The installer's own office could not see the problem, because its network blocks nothing. Tested with Facebook's and Twitter's addresses blocked, each page stopped after the logo and waited a long time before the text appeared.

Both buttons were loaded the ordinary way, in the page header, so everything after them waited.

The developer switched both to code that loads them in the background after the page, moved the Like box to the foot of the home page, and took the Tweet button off the service pages.

With Facebook blocked, the browser builds each page in full without waiting, and the space where the Like box would sit simply stays empty.

Loading the buttons after the page

The fix most sites need is a change in how the buttons load. A few lines of code can fetch them in the background, so the browser builds the page first and adds the buttons when they arrive.

If they never arrive, the visitor loses the buttons and nothing else. Copies of the code pasted in when the site was built, or written into a theme, often use the ordinary method, so check every page template.

The same care applies to anything else a page loads from other companies' servers near the top, such as maps, video players and visitor counters.

Lower on the page, and fewer of them

A button at the foot of the page does less harm even when it loads the old way, because everything above it is already on screen.

Ask too whether every page needs one. A Like box belongs where people decide to follow you, such as the home page; a Tweet button belongs on articles worth sharing, not on the contact page.

A plain link as the fallback

A small Facebook or Twitter icon that simply links to your Page or profile loads from your own site. It asks nothing of outside servers, so a blocked network cannot slow it.

For many small businesses, plain links in the header or footer are enough, with the full Like box kept for the home page.

Testing with the sites blocked

Testing from your own office proves little if your network blocks nothing. Ask whoever looks after the site to test it with Facebook's and Twitter's addresses blocked, the way a strict office network blocks them.

One method points those addresses at a computer that never answers, which copies the silent drop. Every page should still appear at once, with the buttons simply missing.

Run the test again after any change to the theme or a new add-on, since buttons tend to creep back into the header.

The counter-case

A site whose visitors arrive mostly in the evening, from home, meets few blocked networks. A restaurant or a hobby shop may never hear this complaint.

Where the buttons already load in the background and sit low on the page, there is nothing to fix, and a quick test with the sites blocked will confirm it.

Visitors on slow phones still gain from buttons that wait their turn, so the change is worth making whenever the site is next updated, wherever its visitors browse.

Seeing the site from behind a firewall

  1. Find every page template that includes a social button.
  2. Note where each one loads, in the header or lower down.
  3. Switch each button to code that loads in the background.
  4. Move the buttons below the main content.
  5. Keep each button only on pages where it belongs.
  6. Use plain links to your Page and profile elsewhere.
  7. Test with Facebook and Twitter blocked after every change.

Step three is the change that matters even if nothing else moves. Once the buttons load in the background, a blocked network takes away the buttons and nothing more.

Which kind of button belongs on which page is the question behind likes on your website that never reach your page.


Frequently asked questions

Why does my site load at home but freeze at work?

The office network probably blocks Facebook and Twitter. If the social buttons load in the page header, the browser waits for them before showing the rest.

Why does a blocked button hold up the whole page?

A browser builds a page from the top and stops at an ordinary script until it arrives. A network that silently drops the request makes it wait until it gives up.

How do we stop the buttons from blocking the page?

Load them with code that fetches them in the background after the page is built, and place them below the main content rather than in the header.

Do we need the Like box on every page?

No. It belongs where people decide to follow you, usually the home page. Elsewhere, a plain linked icon loads from your own site and never waits.

How can we test what an office visitor sees?

Have the site tested with Facebook's and Twitter's addresses blocked, so requests go unanswered. Every page should appear at once, with only the buttons missing.

Is this only a problem in offices?

No. Schools, libraries and some hotel and waiting room networks block these sites too, and slow phone connections cause shorter versions of the same wait.

West Coast Media Solutions Inc. provides web design, web development, hosting, digital marketing, and business consulting to organisations across Canada, drawing on more than twenty-five years in the field.

Customers say your site freezes at work?

Point us to the site, and we will test it as a strict office network sees it, then fix what holds it up.

Start a Conversation