Reputation: 59
My site is loading up perfectly in Firefox, Chrome and other browsers like Safari (albeit a bit slow). Link: http://www.dafactopedia.com
It was even working with IE till yesterday but after I compressed my JavaScript code with closure compiler it doesn’t seem to load fully. If I disable JavaScript in IE it opens up but not perfectly. I tried switching the Javascripts I had compressed back to their original codes but even that didn't seem to work.
How can I fix this thing?
I would also want to know if I can display a message to IE users to switch over to other browsers as temp solution. IE users make about 25% of my visitors so at least till I get the IE problem fixed, it will act as a temp solution.
Please help, and thanks in advance.
UPDATE : The site opens up in IE8 now but displays the message 'A script on the page is causing the browser to run slow ' and i am given a choice to terminate the script. Also i have used conditional comments for IE users as guided by Jasper. Thanks
Upvotes: 3
Views: 4976
Reputation: 92324
That page has a lot of errors going on!
The first one is a syntax error with this line. Your escaping of js in html is not working correctly
onclick="somewin=window.open('http://www.changedetection.com/detect.html', 'ChangeDetectionWiz','resizable=yes,scrollbars=yes,width=624,height=460');somewin.focus();
I would create a function instead of trying to write code in html attributes, or you can review your html/js escape code that is messing up your string.
Upvotes: 0
Reputation: 1444
For informing IE6 users that it's best to upgrade I use conditinal comments (the following div will only be shown in IE6):
<!--[if IE 6]>
<div id="upgradebrowserwrapper">
<div id="upgradebrowser">
<b>$#upgradetitle;</b><br/><br/>
$#upgrademessage;<br/><br/>
<a href="http://www.microsoft.com/windows/internet-explorer/default.aspx">$#upgradelinkie;</a><br/>
<a href="http://www.firefox.com/">$#upgradelinkff;</a><br/>
<a href="http://www.apple.com/safari/">$#upgradelinksafari;</a><br/>
<a href="http://www.google.com/chrome">$#upgradelinkchrome;</a><br/>
</div>
</div>
<![endif]-->
More info at http://www.quirksmode.org/css/condcom.html
Assuming the site is not an internal tool, I would strongly advise against ignoring higher IE versions.
Upvotes: 2
Reputation: 388436
I tried this issue in IE8 with the help of Javascript Debugger
The error seems to be in the line
if (!document.body) document.write('<body>');
document.write("<iframe name='AdBriteFrame_f682da1f_3a94_45e8_8619_048f9b10b3be' width='160' height='600' frameborder='0' scrolling='no'>");
document.write('</iframe>');
document.writeln('<script type="text/javascript"><!--');
document.writeln('AdBriteRender_f682da1f_3a94_45e8_8619_048f9b10b3be();')
document.write('//--></script>');
Line
document.write("<iframe name='AdBriteFrame_f682da1f_3a94_45e8_8619_048f9b10b3be' width='160' height='600' frameborder='0' scrolling='no'>");
is throwing the error
Upvotes: 0
Reputation: 1768
I used fiddler with IE6 to see that ur js/picad.js file doesn't have any body at all which clearly means that your compression is messing up..
you can safely minify ur javascript and css using YUI Compressor from yahoo. as far as Gzipping the files please check ur compression code.
for showing a messge for IE uses you can place a hidden DIV(style='display:none') and show it using javascript if the browser is IE
i use this code to detect IE6
if (typeof document.body.style.maxHeight != "undefined") {
// IE 7, mozilla, safari, opera 9
} else
{// ie6 code }
Upvotes: 2
Reputation: 121057
I just tried it in IE8, and the problem doesn't seem to be with your compressed javascript but with a script from adbrite.com. Most likely there are variable clashes or some other incompatibility with some of your other scripts. Try temporarily removing the adbrite script and see if it helps. Below are the full details of the error I'm getting.
Hope it helps.
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C; .NET4.0E)
Timestamp: Tue, 16 Feb 2010 09:09:14 UTC
Message: Could not complete the operation due to error 800a03e8.
Line: 52
Char: 1
Code: 0
URI: http://ads.adbrite.com/mb/text_group.php?sid=1493638&zs=3136305f363030&ifr=1&ref=http%3A%2F%2Fstackoverflow.com%2Fquestions%2F2271632%2Fsite-doesnt-load-in-ie
Upvotes: 4
Reputation: 944442
Start with the machine detectable errors.
As an aside, don't comment out your scripts and stylesheets in XHTML (nice as it is to stop Netscape 2 from rendering them as text, it is counter productive in XHTML).
Upvotes: 4