tags:

views:

47

answers:

2

I've recently started using a 3G mobile broadband usb stick. It's from T-Mobile, a UK mobile commmunications company. All seemed well, until I tried to test a site which I've been developing locally on by uploading it to my live server.

When I look at the code of my live site, I can see that 2 things strange are happening:

-1. A script is being inserted into the head of my documents specifically: <script src="http://1.2.3.8/bmi-int-js/bmi.js" language="javascript"></script>

Is there something I can put in my code to prevent script insertion?

-2. Normally my css is included in my page like:

<link href="style.css" rel="stylesheet" type="text/css" />

however now when I look in my source, the css has been inserted directly into the page between script tags like:

<style type="text/css" style="display:none">div.calendar{color:#000;font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;-moz-box-shadow:0px.....

This is happening for some javascript files also.

What is going on?

The test site can be seen at:

http://www.designforhumans.co.uk/thesmilezone/

+5  A: 

The modifications you're seeing aren't actually present in your site's markup. I've visited your site and can verify this. What's happening is, T-Mobile is trying to "optimize" any site visited using your wireless stick, and doing a bad job of it. This guy's reporting the same problem:

It turns out that T-Mobile (and Vodafone UK) think it is appropriate to insert their own Javascript into each page which I visit, which pipes all images through a proxy to degrade their quality. However, due to an improperly terminated newline, this script cannot be parsed by Firefox or Opera in conjunction with any XHTML 1.1 or XML documents.

Here's the first few lines of your head, as I see it:

<head> 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
<title>The Smile Zone | Home</title> 
<link rel="stylesheet" type="text/css" href="manager/templates/smiletemplate/css/style.css" /> 
<link type="text/css" rel="stylesheet" href="http://www.jotform.com/css/styles/form.css?v3"/&gt; 
<link href="manager/templates/smiletemplate/css/calendarview.css" rel="stylesheet" type="text/css" /> 

I don't know if you can override this behavior of your wireless service, but you can rest assured that other visitors to your site aren't having the same issues.

Michael Petrotta
Can you confirm for me that css is included in a seperate file, not between style tags? This is a massive relief for me if you can. Thanks for the above info.
Ashley Ward
I can confirm it: `<link type="text/css" rel="stylesheet" href="http://www.jotform.com/css/styles/form.css?v3"/>`. That file contains CSS starting with "*Form CSS".
Michael Petrotta
I see three or four inline styles; the vast majority are coming from those stylesheets.
Michael Petrotta
Thanks so much. Lifesaver
Ashley Ward
A: 

If you load the website using SSL or browse using a VPN (or Tor) then your ISP won't be able to see the data to modify it. This doesn't necessarily help your users, though.

Andrew Aylett