1

I have an odd problem I've never seen before - linked stylesheets and javascript files appearing inline when I browse the source of a page. It only happens online and not in my local development machine.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link href="css/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="css/extend-bootstrap.css" rel="stylesheet" type="text/css" />
<link href="css/bootstrap-responsive.css" rel="stylesheet" type="text/css"/ >

and so on becomes this kind of thing:

<!DOCTYPE html><html lang="en"><script src="http://1.2.3.4/bmi-int-js/bmi.js?version=1363970337" language="javascript"></script><head><meta charset="utf-8"><title>Pagetitle</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="description" content=""><meta name="author" content=""><style type="text/css" style="display:none">/**/.clearfix{*zoom:1;}.clearfix:before,.clearfix:after{display:table;content:"";line-height:0;}.clearfix:after{clear:both;}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0;}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;}audio,canvas,video{display:inline-block;*display:inline;*zoom:1;}audio:not([controls]){display:none;}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}a:hover,a:active{outline:0

and it goes on. Anyone any thoughts on why this would be happening?

Thanks.

DS

Mogsdad
  • 44,709
  • 21
  • 151
  • 275
dstewart101
  • 1,084
  • 1
  • 16
  • 38
  • Have you checked this in a different browser? Perhaps it's a plugin or extension causing it? – brandonscript Aug 09 '13 at 14:14
  • thanks for the reply. it's happening in firefox and chrome. I'm going to try from a different pc entirely later today, but I haven't intentionally activated anything in those browsers. – dstewart101 Aug 09 '13 at 14:17
  • 5
    Check out the SO responses: http://stackoverflow.com/questions/4113268/how-to-stop-javascript-injection-from-vodafone-proxy –  Aug 09 '13 at 14:19
  • @Stano Thanks very much. I got everything I needed from the links you provided! – dstewart101 Aug 09 '13 at 14:26
  • and @jeff Thanks very much. I got everything I needed from the links you provided! – dstewart101 Aug 09 '13 at 14:26

2 Answers2

0

Do you have any compressing software on the server? If you save the page, does it also comes out as 1 line? Maybe it is a setting in your browser.

Skippengs
  • 60
  • 4
0

If you're using IE, browser tools being enabled would cause this.

This is likely a duplicate post of CSS and JavaScript appearing inline in sourcecode

Community
  • 1
  • 1
brandonscript
  • 68,675
  • 32
  • 163
  • 220