Troubleshooting Help With IE8/Superfish Problem on SOME Computers Only - javascript

Our website uses the superfish jQuery plug-in for our menus (http://users.tpg.com.au/j_birch/plugins/superfish/), and they work fine in Firefox, IE6, IE7, Safari, Chrome, etc. ... and even in MOST IE8 installations. The problem is, in some IE8 installations, the menus don't work (they highlight on mouseover but don't drop-down the menu).
This has me baffled. In addition to a couple customer complaints, I've got one (Windows XP) machine in-house that reproduces the issue. However, I also have another Win XP/IE8 machine in-house which doesn't experience the problem. I'm used to dealing with JS/CSS issues between different browsers, but this issue between two machines on the exact same OS and browser is a bit much.
Oh, and just to further obfuscate the matter, the machine that is reproducing the issue shows no errors, Javascript or otherwise (even when I go in to developer mode). So ... does anyone have any suggestions on what could be going on?
As far as I know neither of my two "test" machines have any special plug-ins or anything which would cause the problem, they're identical in terms of everything that matters, and there's no JS error occurring that I can check the stacktrace of or anything. But this isn't just some crazy problem that's unique to my test machine, because as I said some customers have reported it too.
Any help would be appreciated.

Can you try setting the IE7 compatibility mode and see whether the problem persists?
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
(into the head of the document, best would be directly after <head>)
If it works then, you'll definitely know that it is some IE8 specific rendering issue. My first bet would be that your menu uses CSS hacks to set certain IE specific settings, unaware that IE 8 (fortunately) behaves differently and more standards-compatibly than its predecessors. If that is the case, you would have to use an IE8 specific CSS hack (or, better, specific style sheet) to "re-fix" those settings.
But first, check whether this really is the problem using the compatibility view.

Try turning off compatibility view: Tools -> Compatibility View -> Uncheck. I too struggled with this for the better part of an afternoon until I just tried this on a whim and it worked!

Try clearing Internet Explorers cache. Go to Tools -> Internet Options -> Browsing History section -> Delete ... -> Temporary Internet Files -> Delete.
For reasons unbeknownst to me, I've seen all IE versions start behaving strangely when the cache has been full or not cleared for a long time.

I have a Windows 7 64bit Home premium. The laptop encountered an issue called SupperFish.
First I tried resetting home page to different URL’s. IE8 kept returning to SuperFish.com.
Look in Add and remove programs, was not there, Not in startup or MSCONFIG (startup).
Third cleared Cookies then History. No help. Forth ran Microsoft Security Essentials, SpyBot S&D, Norton Constant Guard , Ad Aware. Problem is still there, Looked in C:\Program Files and found a folder called SuperFish, in that folder there was an Uninstall executable. I ran the Uninstall using a administrator account, and the problem is no longer showing up, after several hours of use.

not sure if it is a solution and that this is what you meant by not knowing how to fix it... but I cleared all my cache/history/cookies etc. from IE8 and if immediately worked (looking the same as other browsers).
maybe a fix for now but that worked...

This issue wound up going away without us ever figuring out what caused it, so now even if we did want to figure it out we can't (as we can't replicate). Therefore I can't really mark any of the above answers as correct, but since they exist I can't delete this issue either. So, I guess the best I can do is file this answer, but it's a rather unsatisfying one; sorry.

Related

XAMPP won't update web source files until they're committed to Git on Chrome

I'm trying to create a web application for university. I've been doing fine with XAMPP, using Visual Studio Code and Sublime Text as my editors and so far so good. However, a couple of days ago, I ran into what seemed to be a bug.
While accessing "localhost" on Chrome, the website didn't seem to reflect the last changes to the HTML and CSS code. I also modified some Javascript and it didn't work either, the website stayed the same.
Not even simple things like changing a colour on CSS or adding an alert window on Javascript would appear on the actual web.
Inspecting the website in Chrome shows the old documents and source code, however, when going to the "htdocs" folder at XAMPP, the documents were successfully changed, and no matter what I did, relaunching XAMPP or Chrome didn't fix it either.
I decided to give up for the day and committed the changes to my GitHub repository. To my surprise, I refreshed the website afterwards and it worked.
I thought it was an isolated bug, but it seems like it is not, it happened today again while working on a completely different project.
What's more surprising, this behaviour doesn't seem to happen on Firefox or even Safari, I've tried both and it seems to be fine. However, I prefer the tools included in Chrome, so I'd rather use this one.
Has anyone else had the same issue? If so, how did you fix it? Or in case it is intended to work like that, why is it? I don't see any possible scenario where this could be useful.
Thank you in advance.
This is more of a workaround than a solution really, but you could just try ctrl+F5, this will clear your cache and you're good to go again.
This is probably the single worst Chrome bug when you're doing incremental small changes but Chrome loads it from the cache and not the original files.
What does Ctrl+F5 do?
This ignores the page saved in the cache and does a fresh GET. This should serve well enough as any changes made will be reflected in Chrome on doing so. Or you can manually clear the cache from the Chrome settings.

Is it possible to insert a <META> tag into the head when loading the page? [duplicate]

I have a strange problem with IE 10. Many jQuery scripts that are working fine on IE 8, 9, Chrome, firefox and safari but broken on IE 10. Issue came into light only when some users switch to IE 10.
Easiest solution I found to add
<meta http-equiv="X-UA-Compatible" content="IE=9" />
in <head></head>.
The problem is site has a lot of pages and most pages don't have inherited master page.
So is there any way to add this through javascript, as we have a common referenced js in all webpages.
No, there is no way to do that in Javascript. At least, not in a way that would actually achieve anything -- the rendering mode is fixed when the page is loaded, so there's nothing you can do to change it in JS from within the page.
An alternative solution would be to add the X-UA-Compatible flag as an HTTP header. This would set it on all pages across your site without requiring any HTML changes.
You've mentioned that you're using IIS. This page should help you configure it for your site.
However, the real solution would always be to fix the site so that it works in IE10. This is likely to be the best solution for you because IE10 is actually pretty good at being standards compliant; if you've got something that works in IE8 and IE9 but not IE10, then it's near certain that it is actually something wrong in your page rather than anything wrong in IE10.
This in turn means that even if it works today in other browsers, there is likely to be a bug in your code that could break in future versions of other browsers.
The other problem with using IE's compatiblity mode is that it really isn't an accurate copy of the old IE version it's supposed to be compatible with. This is particularly the case with IE10's compatibility modes, because there are some old features that have been removed from IE10 completely, and which are therefore not available in compatiblity mode either. This means that IE8 and IE9 might work, but IE10 in IE9-compat mode might not work. It depends what the actual issue is, but you'll need to test it just as thoroughly in compat mode as you would in real IE10 mode.
And then there's the question of how you deal with the site going forward into the future. What about IE11 and beyond? Compat mode removes new features that IE might have, so by sticking with IE9 mode you'll be stopping yourself from being able to use features like text shadow or CSS transitions. You'll want to use those features eventually, so you will need to fix the site at some point; why not now?
Thanks everyone for responses and help.
What I was looking for was like adding below code in web.config:
<httpProtocol>
<customHeaders>
<clear/>
<!--This setting will make document mode to highest mode available we need have mode 8 and above-->
<add name="X-UA-Compatible" value="IE=IE9"/>
</customHeaders>
</httpProtocol>
in <system.webServer> section.
JavaScript is run after the page load, this means you will not be able to modify the meta response from the server to the client afterwards. It might be easier to address the issues with IE 10 instead if there are no common headers
var m = document.createElement("meta");
m.setAttribute("http-equiv", "X-UA-Compatible");
m.setAttribute("content", "IE=9");
document.getElementsByTagName("head")[0].appendChild(m);
But as Teemu hinted, it will most likely not show any effect.
It is hard to figure out (from the question) that what is actually being broken? Can you tell which JavaScript code is being broken?
Anyways, one solution may be changing the document mode, what you have stated above. Another solution may be changing the browser's JavaScript version (if the problem is due to in-compatible JavaScript).
You can change the browser's JavaScript version be adding a browser configuration file to App_Browser folder in you asp.net application. Or to do it automatically, add this nu-get package and modify it.
install-package App_BrowsersUpdate
https://nuget.org/packages/App_BrowsersUpdate

Should I be worried that my site crashes IE9 and how to fix?

I've downloaded the latest version of IE9 beta and my site wrecks it. No problems on any other browser, but on IE9 it freezes on every page. The thing is, many other sites also make it gag.
Should I worry?
IE's fault or do my site and I need to do some serious soul searching?
How does one debug this stuff and are there a list of common culprits? Is it most likely a Javascript issue? jQuery?
If your site is dying on IE9 (assuming it's not the result of known IE9 bugs), you definitely need to address it. You can download tools like the IE Developer Toolbar to help you move about within your page once it's loaded, and there are other resources online like jslint that will help you examine some of your javascript and work on its quality.
If you find any specific issues that you're unsure of how to address, please don't hesitate to return here and post more questions - there are (literally) thousands upon thousands of brilliant minds waiting to assist you.
Update - You mentioned in the comments below that IE9 dies before you can even determine what is causing it to die. This is (unfortunately) the case with much software. Often times you can try to repeat the same actions in Chrome, Firefox, Opera or some other browser and see how it responds. Many times you'll find that another browser may provide an error without crashing entirely. This could give you some insight into what may be causing IE to crash.
Jonathan submitted a great answer about using jslint to verify the integrity of the JavaScript, and using other debug tools on other browsers to detect for a non-crash error. I did both and thoroughly went through my site, only to find that IE9 was still crashing!
So I looked into it and here's what I found: the main cause of IE9 beta crashes are add-ons that are incompatible with the new release. Adobe PDF viewers, printer add-ons, toolbars, etc. Most everyone has at least one add-on in their browsers. So I disabled all my add-ons and now my site works.
I'm not sure why my site seemed to crash more than others with IE9, but if people are having problems with there site, I'd suggest (1) disabling all add-ons just in case, and then (2) using Jonathan's answer (which I'll leave checked as the official answer since it has to do more with programming).

Getting very strange javascript error and this page also refuses to work in Internet Explorer 7 or 8

This is the page I'm working on... http://schnell.dreamhosters.com/folio/earthquake.html
Its purpose is explained via the instructions on the left. I'm finding that after doing so many searches and clicking so many of the links in the list on the right that the page freezes up, the Google Map stops working and Firebug tells me of an error in main.js and it goes like this...
b is undefined
Line 49
I really don't know why this decided to happen all of a sudden and the error is so cryptic and muddled amongst Google's code that I don't think I'll be able to figure this one out by myself.
Another problem I'm finding is that the page itself simply refuses to work in IE7 and IE8 (or probably any version of IE for that matter). I am also at a loss as to how to solve this problem because I can't figure out how to use any of IE's debuggers (if they even have one) and seeing how I already tested this and made it work in two browsers (technically three since Safari runs off WebKit just like Chrome), I just don't have the drive or capacity to imagine what could be going wrong.
Any help would be greatly appreciated
Moved from comment to answer.
As scunliffe mentioned, you are trying to do a crossbrowser AJAX without using jsonp. Use either $.ajax() with datatype jsonp or add a &callback=? at the end of the URL in the $.getJSON() call.
IE8 is quite good when it comes to helping out the developer. From memory F12 will open up the developer window where you can inspect the DOM, CSS and debug script.
Your error is cryptic because most javascript comes minified, so variables are all remapped to single letters, etc. See if the script causing the problem has a development (i.e. unminified) version as this will make a lot more sense to step through.
With regards to your specific issue it sounds like a timing issue. While browsers do a decent job of executing script in a consistent way if you follow standards, they do differ in their timings i.e. when things execute. That would explain why b is undefined in some cases and not others.

IE6 sometimes not loading stylesheet

We are having a problem where IE6 (the only browser we have noticed this happening on) seems to be caching an empty version of our main stylesheet. The only way to resolve the problem is to request the stylesheet directly by typing the its url directly into the browser, and then when you refresh the page, it will appear with the styles. About a week or so later, it will happen again.
This isn't happening to all users, but we can't figure out why it is happening.
We are running IIS on Server 2003, and this problem started happening a couple of months ago (never had any problems before that).
I appreciate any help you can offer.
Paul
*I have looked closer and now it is doing the same for certain Javascripts as well.
12-12-2008
Thanks for the help Grant, IE is fairly locked down, but have checked what can be changed and it is fine, and no extra plug-ins are installed.
If you Ctrl-F5 or kill the temp files it doesn't seem to do anything. It's not until you request the file directly that it actually it actually fixes the problem which does indicate that there is a problem with IE caching a broken or empty version. Unfortunately, I must now wait until it happens again and I'm going to check the log files on the server.
Again thanks for the help.
I can't give you a direct answer, but I would start by installing Fiddler and investigating the Content-type and last-modified response headers of the files that are causing you problems.
Also take note of the If-Modified-Since and Pragma request header values.
As well, I would check the Accessibility settings in IE (Tools > Internet Options... > Accessibility).
In addition, ensure they haven't installed any add-ons that might be causing this type of behaviour. An unrelated example: a couple of years ago, we had a problem where IE6 stopped sharing Session cookies between browser windows for one of our users. It turned out to be some cursor add-on to IE causing the problem.
Obviously if your users are using a locked down copy of IE, the above suggestions don't apply.
Lastly, what happens if the user holds CTRL and hits F5 to refresh the page unconditionally, do they get the latest copy of the stylesheet and JavaScript files then? And have you tried clearing the browser history completely and loading a fresh copy of the page (perhaps the cache itself is corrupt somehow)?
I also had the same behaviour once. However, I was using a php generated stylesheet, with the headers and every other information (client-side cache, server-side cache, compression) finely tuned in PHP for optimal performance.
Worked like a charm, but it seemed that IE6 did not load the stylesheets on some computers, in a non-reproducible way. I didn't have the time to investigate,and I didn't have access to the problematic computers, so we went back to plain-old simple stylesheets, and everything went back to normal. We said it was firewall-related, but I'm sure there's something nasty hiding inside IE6.
I beg to know what it is...

Categories