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.
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.
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?
Do you care if the fix looks @ UA or follows some specific approach?
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?
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]-->
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.
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+
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?
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].
: http://browser-update.org/update.js[quote=“sschafft, post:3, topic:10886”]
So would you be ok with us / someone just re-writing it?
That would be very ok!
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…
Now testing: mobile (small screen) layouts on key pages
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.
The old browser warning should now be functioning again, sorry about that.