Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My ISP injects JavaScript files - most notabily bmi.js - and certain other unwanted additions to web requests when tethering from my phone.

It would be OK if the JavaScript was useful, but it is programmed terribly - and as a JavaScript developer, this really annoys me when the injected scripts break my own work! It looks like it annoys some other people too...

I'd like to block any activity to the IP address 1.2.3.*. I've noticed and in use, or if anyone can give me any better solutions, I'd be happy to try.



I have to agree with George Edison with That sounds like a terrible ISP. The plot thickens ... while playing around with iptables and the like, I noticed that as soon as I blocked, the script was simply injected from another domain. I blocked that, it moved on to another.

In my web browser, I can access the script from ANY DOMAIN! What the heck is the ISP doing here? For example, these URIs all respond with the script:


and nauseatingly:


face palm

share|improve this question
That sounds like a terrible ISP. – Nathan Osman Oct 4 '11 at 20:33
What phone are you using? – Nathan Osman Oct 4 '11 at 20:40
Both my old Nokia E72 and new Nokia E6 did this. The ISP is Virgin Mobile (UK), and I am under the impression that it's o2's fault for implementing this feature in their data centres, which is wholesaled to Virgin. – Greg Oct 5 '11 at 8:52

In Firefox NoScript add-on open Options > Advanced > ABE, USER ruleset, then add:

Site */bmi.js

Of course you can also use regular expressions, and combine multiple URL patterns in the same rule.

You can find more info here:

share|improve this answer

The page you linked to in your question contains the following comment:

I have found a solution! :D
On your iPhone go to Settings > General > Network > Cellular Data Network
Then Under “Cellular Data” change the APN to “”
And change the Username to “bypass” (no quotes in both cases)
Then save the settings and restart your iPhone and the bmi.js file should no longer show up while tethering. Leaving you with full resolution browsing! The iPhone browser also appears a lot better since it was also affected by the js file.

share|improve this answer
Well, the problem might be that Greg doesn't have an iPhone... what then? :) – James Oct 4 '11 at 21:20
@jrg: I asked him (see my comment above) but I haven't heard anything back yet. – Nathan Osman Oct 4 '11 at 21:52
@GeorgeEdison I linked to three pages, not all of them were iphone users, not all of them were o2 users. – Greg Oct 5 '11 at 9:01

aim your web browser @ and you'll be able to turn off image compression which will remove that annoying javascript injection (worked on t-mobiles network anyway)

if that does not work, use adblock for firefox/chrome to blacklist the bmi.js file

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.