IE8 disclaimer message no longer showing up


(Scott Schaffter) #1

For some reason the IE8 “Your browser is too old to work on discourse” disclaimer seems to not be working any longer. Tested locally / meta.discourse.


(Neil Lalonde) #2

Yeah our browser-update custom code is completely broken… It depends on jQuery being loaded, but we use jQuery 2 now which doesn’t work at all in IE8. Getting around that, I find that it also depends on our I18n js, which obviously doesn’t work because jQuery isn’t loaded.

So, trying the stock browser-update code, I get this instead:

SCRIPT14: Not enough storage is available to complete this operation.

So. Good times.

I’ll put this on my todo list. Or consider it a place where someone can contribute a fix. :wink:


(Scott Schaffter) #3

So would you be ok with us / someone just re-writing it? Were there any
specific other considerations with that detection code that we should be
aware of when writing something to use?


(Scott Schaffter) #4

Do you care if the fix looks @ UA or follows some specific approach?

This approach looked interesting…

The I18n issue… might be hard if it needs jQuery. Maybe conditionally load an old version of jQuery? Or would that be horrible… does I18n need 1.7.2+? Did you use a particular I18n library / is it built into the i18n_helpers.js?


(Bill Ayakatubby) #5

If it’s an IE8/9-specific message, couldn’t you use a conditional comment? I forget the precise syntax, but it’s something like

<!--[if lte IE 9]>
<p>Update your browser, dummy.</p>
<![endif]-->

(Jeff Atwood) #6

It was not IE specific, it was testing for one or two key specific capabilities we need that only exist in newer browsers. That way it also worked for ancient versions of Firefox and Chrome as well. Firefox in particular, does have some pretty old versions out there still active in corners of the 'net.


(Bill Ayakatubby) #7

Would Modernizr work? According to their docs:

We support IE6+, Firefox 3.5+, Opera 9.6+, Safari 2+, Chrome. On mobile, we support iOS’s mobile Safari, Android’s WebKit browser, Opera Mobile, Firefox Mobile and whilst we’re still doing more testing we believe we support Blackberry 6+


(Scott Schaffter) #8

Looked like iE was tagged @ ie= new and then pushstate / history was what you were checking for.

Can we do the same and then conditionally load an older library of jquery so the I18n works?


(Neil Lalonde) #9

For i18n, I imagine the translations could be done without jQuery. It’s only one string that’s being shown, so a single lookup is all that’s needed. [That’s how browser-update originally did it][1].

[1]: http://browser-update.org/update.js[quote=“sschafft, post:3, topic:10886”]
So would you be ok with us / someone just re-writing it?
[/quote]

That would be very ok!


(Scott Schaffter) #10

We are thinking about just doing an nginx redirect based on header / UA…

or try using http://yepnopejs.com/ which is baked into moderizr which is used already to then conditionally include the right version of jQuery. I guess we could just check for push state given that was what was used before…

Any preference?


Now testing: mobile (small screen) layouts on key pages
(Neil Lalonde) #11

Any solution that doesn’t depend on jQuery, or adding any new dependencies, is good with me. Checking push state is probably the way to go.


(Jeff Atwood) #12

The old browser warning should now be functioning again, sorry about that.


(Jeff Atwood) #13