feb 2 2012
Respond.js bug?
I ran into a strange bug today.
I recently launched Krimimessen.dk where I have used a small polyfill script written by Scott Jehl, respond.js, to make the site’s responsiveness work in older versions of Internet Explorer.
But then one of my colleagues made me aware of a bug that seemed to trigger when clicking on links in Internet Explorer 8. Not in everybody’s Internet Explorer 8, oh no. Only in Internet Explorer 8 on certain machines. Well, who said it should be easy to test for bugs?
Instead of going to the desired destination, the browser went to a URL with this pattern:
res://ieframe.dll/acr_error.htm#the-url-without-http
I have done a little searching on the issue, and generally people say the problem goes away if you delete the browser cache or disable browser extensions. However, that solves no problem, because I can’t ask my users to delete their cache.
Then I stumbled upon someone in the Drupal.org forum who had had the same issue and one of the proposed fixes was to move respond.js to the footer.
And there you go. It seemed to work. At least the bug disappeared.
But according to the Respond usage instructions, the script ought to be loaded as quickly after the CSS file as possible to avoid glimpses of “unresponsiveness” in ie.
So now I wonder if this is a bug in ie8 bug can be fixed within respond.js? Or is it something else, that triggers the bug? Or am I just using respond.js wrong?
feb 25, 2012 @ 04:08:40
Thanks for the tip, it is a very frustrating issue. In my case, I found IE8 would work for about 3–4 pages of the site from a clean cache, and then, sometimes ‘recover’ the tab, sometimes not render the page properly, and sometimes it would give me the same ieframe.dll url.
I actually had my respond.js in the footer, but thanks to your post, it put me on the path of a related issue of having the background image loaded in the . It seems that moving the background image style to was enough to completely remedy the issue (along with having the respond.js in the footer).
Bless you NetSans, and curse you IE8
apr 25, 2012 @ 08:39:21
Adding a class to the body solved the problem! No need to put the respond.js in the footer
Thank you for your help