Link to home
Start Free TrialLog in
Avatar of kenjpete
kenjpete

asked on

Older version of jQuery breaks IE9 'Back' button

We have a site using an older version of jQuery (1.4.1) that is being used to power a slideshow plugin on our home page. Recently we noticed when using IE9 in standards mode, that the 'Back' button had to be clicked 3 or more times to actually go back one page in the browsing history.

In fact, if you press and hold the 'Back' button you actually see the URL of the page multiple times, rather than the actual page title once, as you normally would.

After spending the day researching the forums and trying different settings I discovered that if I update the jQuery core file from 1.4.1 to 1.9.1 or higher, the problem with the 'Back' button goes away. However, my jQuery slideshow breaks with higher versions of the jQuery core file (it is an older jQuery slideshow plugin).

If we put IE9 into compatibility mode, or use any other browser including IE8, IE7, Chrome or Firefox, the older jQuery file and the 'Back' button work properly.

Any ideas why IE9 appears to have trouble with older jQuery files?
Avatar of Gary
Gary
Flag of Ireland image

Is there any URL hashing going on?
Avatar of kenjpete
kenjpete

ASKER

I'm not sure but I don't think so? Can you tell me more about URL hashing, I'm not familiar with it? Are you talking about URL shortening like when using bit.ly?
No, when you append the url with an hashtag, often seen when you have tabs on the page.
Have you got a link to the site - this would make it easier to debug.
Oh ok, no, there is no hashing going on. Take a look at http://www.capitalregionboces.org. Thanks!
Actually there is.
From line 440 in jquery.galleria.js you are using hash tagging if in IE (hashing only works in IE9 and above) that's why in IE8 and lower the back button works fine and in other browsers there is different logic being applied.

Since the code seems to be working on some 'iframes' I am not sure how you would fix it bar just commenting it out.

Is there a reason you are using this history extension?
Ok I see what you are referring to, so why does the problem go away then if I put in the latest jQuery core file (1.10)? Also, the answer might be to use the latest version of that Galleria plugin....correct?
ASKER CERTIFIED SOLUTION
Avatar of Gary
Gary
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I wasn't aware there was a history extension in that Galleria plugin? It was a jQuery plugin we found a few years ago that met our needs at the time and didn't become a real issue until recently.

I just looked at the developer's web site and it appears there is a new version our this year. I may try upgrading the plugin and the core jQuery file and see if it works?