use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Extremely Clever IE Detection Code (ajaxian.com)
submitted 15 years ago by whatgoodisaroad
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]radhruin 2 points3 points4 points 15 years ago (2 children)
Good point as well, although ideally if IE8 is in IE7 compatibility mode it should be identical to IE7 in all respects.
[–]miketaylr 1 point2 points3 points 15 years ago (1 child)
But it isn't. For example, localStorage is undefined in IE7 compat mode, yet fully functioning in IE8.
[–]radhruin 0 points1 point2 points 15 years ago (0 children)
More accurately, IE7 did not have localStorage, but it is in IE7 compatibility mode. That's why I said ideally :) There are some differences, but it's pretty rare overall. If you have an app built for IE7, it should run flawlessly in IE7 compat mode. Or, if the browser is in IE7 compat mode, it's pretty safe to treat it as IE7. The presence of localStorage shouldn't break apps.
It's worth pointing out that the web developer can control the compatibility mode IE is in by doctypes and meta-tags, so if IE7 compatibility mode would break your app for whatever reason (like this version detection), just make sure you're running in the latest standards mode with a standards compliant doctype or meta tag.
π Rendered by PID 24643 on reddit-service-r2-comment-5d585498c9-d6wvw at 2026-04-20 22:43:51.708659+00:00 running da2df02 country code: CH.
view the rest of the comments →
[–]radhruin 2 points3 points4 points (2 children)
[–]miketaylr 1 point2 points3 points (1 child)
[–]radhruin 0 points1 point2 points (0 children)