Breaking the News - Blocking the BBC News Breaking Banner and Playing Pranks

Update: There’s a newer article about how to do this on all devices, including phones and tablets.

TL;DR, block

You may also like: How to Watch BBC News Videos on a Desktop Without Flash.

There is a very annoying feature that has been added to the BBC News website. It’s a breaking news pop-over that adds itself to the bottom of the page when something important is supposedly happening. Like some sort of presidential alert, you can’t opt-out. Until now…


If you just want the solution to block this annoyance then skip ahead, otherwise read on for some background.

How it Works

There is some JavaScript on the page which polls a URL every 30 seconds. This contains a JSON payload that has escaped HTML in it when there is a breaking story. Such as this tidied up example.

  "pollPeriod": 30000, 
  "isError": false, 
  "html": "<div class=\"falcon\">\n 
    <div class=\"falcon__inner\">\n 
      <a href=\"\/news\/uk-england-manchester-33593086\" class=\"falcon__link\" data-asset-id=\"33593086\">\n 
        <h2 class=\"falcon__badge\">Breaking<span class=\"off-screen\"> <\/span><\/h2>\n
        <p class=\"falcon__heading\">Second body found after Bosley mill explosion, Cheshire police say<\/p>\n
      <button class=\"falcon__button\">\n
        <span class=\"off-screen\">Close breaking news<\/span>\n 

I’m sure that the eagle eyed among you can already see some problems with this. The HTML is just delivered raw and is simply inserted into the DOM. This opens up lots of possibilities which I will get onto later. It would be better if the relevant information was in separate JSON properties and then safely turned into HTML with a template.

It would have been polite to implement a permanent dismissal feature so you could opt-out of these disturbances forever. This could easily be done by setting a cookie which indicates that the user never wants to see these notifications again. There is already a data asset ID cookie which ensures you only see each breaking story once. However, there is a hack you can use to block the breaking news notifications completely.

How to Block it

You need to add an entry to your hosts file for the domain that points to your own computer. This way the DNS is overridden and no HTML is ever delivered to the page.

On Windows this file is in Windows\System32\drivers\etc\ and on Linux / OS X it’s in /etc/. You’ll need to use a text editor running as an admin/sudo. Add the following entry.

Save the file and now all requests to that host should fail. Unless you happen to be running a web server…

Just One More Thing

As the BBC doesn’t use HTTPS you can easily play some pranks if someone leaves a computer unattended or if you happen to be in charge of an internal DNS server.

Did you know the marquee tag is still supported‽

And because raw HTML is used this allows you to inject scripts. The possibilities are endless. You’re not restricted to just messing with the breaking banner.

Did you want Comic Sans with your alert box‽

If you want to try this out then just use the following entry instead of the localhost IP address above.

Archived Comments

Billy says:
31st July 2015 at 4:38 pm

Thanks dude, was getting quite annoyed with that bbc banner.

The other annoyance is the “OMG YOU MUST DOWNLAOD FLASHPLAYER ASAP”, box that covers over the still picture at the beginning of a BBC flash video. Don’t they know that some people deliberately don’t have flash installed? Talk about unsubtle.

When do you think the BBC is going to convert to html5? in time for the 22nd Century or later?

James says:
31st July 2015 at 4:54 pm

Yes, that is annoying. They have special support for HTML5 video on iOS (for both news and iPlayer) but they don’t want to make it the first choice.

You can spoof a mobile User Agent to force HTML5 video such as:

Mozilla/5.0 (Linux; Android 4.3; Nexus 7 Build/JSS15Q) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2307.2 Safari/537.36

B. Lang says:
12th February 2016 at 2:48 pm

That’s great. However, this breaking news popup is even more annoying on Android, where, not only can you not get rid of the damn thing, but it seriously hampers you trying to read the article you set out to look at. How do I get rid of it on Android? … . words of one syllable please! i.e. I don’t know anything about html … .

James says:
12th February 2016 at 4:07 pm

I’ve not tried it on Android but I think you would need a rooted phone to edit the hosts file. You could try Firefox for Android. There are likely some add-ons which can block this. An ad blocker you can add a custom rule to for example.

B. Lang says: 13th February 2016 at 12:22 am

Many thanks, will give Firefox a try.

This blog is treeware! If you found it useful then please plant a tree.
Donate a treeDonate a tree🌳🌳