compatibility mode in IE11 - javascript

How can I use the compatibility mode in IE11 like I had it in IE10?
Under Emulation I find compatibility for documentmodus. But is this realy the old compatibility mode from IE10? Most important for me is the Feature-Set for javascript.

Under Emulation I find compatibility for documentmodus.
Yep, that's right. That's what you're looking for.
But is this realy the old compatibility mode from IE10?
Yes. This is exactly the same feature as the compatibility mode that was available in earlier IE versions.
Most important for me is the Feature-Set for javascript.
I'm not really sure what you mean by this, but the document modes available in IE11 are exactly the same as the ones available in IE10, so whatever you were doing in IE10 should be the same in IE11.
It's worth pointing out that the use of compatibility mode is discouraged in most cases (MS originally planned to drop it from IE11, and only brought it back at the last minute).
If you're using compat mode for testing that your site works with older IE versions, it is not a good solution for this, because the various compatibility modes are not 100% compatible with real IE versions. (this has always been the case; nothing new here with IE11).
For testing purposes, it is better to use real copies of each IE version that you need to support.

Related

What is the browser support for the "digitalbazaar/forge" lib (native JavaScript TLS implementation)

I'm using the digitalbazaar/forge JS library, but I cannot find anywhere what the browser support is. Does anybody know?
After some digging we found that forge uses window.JSON and Object.create and other more ECMAScript 5 stuff. This means that out of-the-box the lib doesn't work in IE7 and below.
We included two shims: ES5-shim and Json3 and with those in place the code ran without any issues.
I'm not sure of the comments of #bruno (see above) are valid or not for our use case (we're not using TLS itself, but other encryption stuff that is also in the lib), but with respect from it just running this seems to work on all browsers we tested it in (IE6 and up, chrome, firefox, mobile safari, mobile android and opera mini).
What will be worse in the older browsers is the entropy of the PRNG's seed because they do not have a strong native entropy source, which makes the encryption a lot less secure in those browsers.

What's the difference between IE 10's "Quirks" and "Internet Explorer 5 Quirks" modes?

What is the difference between Quirks Mode and Internet Explorer 5 quirks in IE10 developer tools, JavaScript & CSS-wise?
Which of these 2 modes can be triggered from HTML (as opposed to the devtools)?
I read this blog post on MSDN, but couldn't understand when this IE5 quirks mode can be in action on real world websites. It says all they have to do is not include the doctype and the browser must be in Compatibility View. Is the latter enabled manually or via HTML or what?
I'm a plugin author, and I'm worried about other people having my plugin broken with their document/browser mode.
IE versions prior to IE10 has just a single Quirks Mode. This mode is now known as IE5 Quirks In IE10 and higher.
IE10 introduced a second Quirks mode which it simply calls Quirks.
Both of these modes change the rendering mode to use the old "quirks" box model, among other layout changes. This much is consistent between them.
The original Quirks Mode was basically a backward-compatibility mode to emulate IE5. Because of this, in addition to changing the box model, etc, it also disabls the majority of the browser features that have been introduced since IE5 -- so in this mode, none of the new HTML5 features will work.
The newer Quirks mode uses the same rendering rules as the old quirks mode, but does not disable all the browser features.
That is the basic difference between them.
The question could then be asked as to why bother having both modes?
The answer to this is that other browsers (eg Chrome) also have a Quirks mode, which is triggered (just like IE) when a page doesn't have a doctype. But other browsers have never disabled any of their features for backward compatibility in the way that IE did.
The result was that a site in quirks mode could look quite different in IE compared with other browsers, even when the basic rendering rules were the same.
The newer quirks mode was therefore introduced by IE in an effort to improve cross-browser compatibility for sites in quirks mode.
But as a result, the newer quirks mode will render some pages differently to the older quirks mode, so the older one was still needed in order for MS to support users whose sites were written for it.
Ultimately one should, if at all possible, avoid using quirks mode (either of them). Despite the cross-browser efforts MS put in by introducing the extra mode, there are still major differences between browsers when you are in quirks mode.
Best practice is always to use Standards mode, wherever possible.
Quirks mode should be unnecessary anyway: If you need the Quirks mode box model, this can be accessed in standards mode by using CSS box-sizing:border-box.

List of areas missing support for ECMAScript/JavaScript in major browsers?

Is anyone aware of a definitive list of areas of missing support for ECMAScript/JavaScript in the major browsers (I'm talking IE7+, Firefox, Chrome, Safari and Opera).
Obviously we do feature detection in our code, but I'd like a list of features that we need to perform detection on ideally.
Some commonly referenced sources are
Great compatibility tables at QuirksMode. Some of them are being updated recently.
Kangax sums up ES5 support very well.
Microsoft released reports of IE standards support.
Can I Use also includes some information about support of a few Javascript APIs.
A popular source many folks use is: http://kangax.github.com/es5-compat-table/
For Mozilla: https://developer.mozilla.org/En/JavaScript/ECMAScript_5_support_in_Mozilla
For Webkit: http://labs.trolltech.com/blogs/2010/01/15/ecmascript-5-and-webkitjavascriptcore/
For IE: http://www.microsoft.com/download/en/details.aspx?id=14170
You might find Thomas Lahn's ECMAScript support matrix useful.
I doubt very much that there is a definitive list of all the bugs, non-conformities or inconsistencies of browsers, even if restricted to some (undefined) set of "major browsers". The usual strategy is to program for standards and use feature detection and documented alternatives to work around known inconsistencies. Then test as widely as reasonable to discover the unknowns.
While browsers frequently introduce new features, they rarely remove old ones without a very long period of deprecation. So well written code should continue to work in new browsers even if if contains feature tests to work around inconsistencies in browsers that are no longer in use.

javascript slow in IE but fast in Firefox

It is very slow to access this page using IE, but much faster using Firefox. Especially when I increase the number of nodes of people. Any ideas what is wrong?
http://thejit.org/static/v20/Jit/Examples/RGraph/example1.html
BTW: IE is even slow when accessing from local file system.
thanks in advance,
George
Internet Explorer's Javascript engine is slower than that from other web browsers, at least when using IE with versions lower than 9. So, if you're using IE 6, 7 or 8, now you know why.
Like raynjamin said, try testing IE using Sunspider.
The latest stable Firefox (3.6) is fast, but for example, Google Chrome is even faster. A browser's Javascript speed depends on its underlying implementation.
Update: to give you an idea of how "fast" IE is compared to other browsers, I've done a benchmark on my own computer using Sunspider 0.9.1. Here are the results:
- Internet Explorer 8: 5039.8ms
- Firefox 3.6: 967.9ms (loaded with extensions)
- Chrome 9: 276.3ms
- Opera 10.6: 293.2ms
- Safari 5: 397.0ms
As you can see, IE 8 is about 5 times slower than Firefox 3.6 and almost 20 times slower than Chrome 9, at least when using Sunspider tests. That is a drastic difference and you can see that IE 8 isn't all that fast.
Update 2: There is one way to make IE faster. A plugin called Chrome frame exists. Using this plugin will make IE faster since it will use Chrome's engine. I haven't tried it personally, but I've heard good things about it.
IE is slow. Fact.
Javascript runs much slower in IE than in other modern browsers. You can test it for yourself using a javascript benchmark like sunspider.
Guys Got the Culprit here... :) :)
After doing lot of RnD on Server side and Client side, I took a look at "Developer Tool" in IE. You can find something like "Document Mode: Quirks". If you check the Wiki page for this Quirks mode, You can find a definition as "In computing, quirks mode refers to a technique used by some web browsers for the sake of maintaining backward compatibility with web pages designed for older browsers, instead of strictly complying with W3C and IETF standards in standards mode."
So this all becuase of checking for compatibility for all components on page. And hence the performance issue. :)
And When I changed this mode to IE 8 Standard. Things started working really well.
IE and its issues ...!!!! :D

Which web browsers natively support Array.forEach()

Which browsers other than Firefox support Array.forEach()? Mozilla say it's an extension to the standard and I realise it's trivial to add to the array prototype, I'm just wondering what other browsers support it?
I just checked this for another question: JavaScript for...in vs for.
On kangax's ECMAScript 5 compatibility table, Array.forEach gets a 'yes' for all browsers except IE8.
As of September 2011, IE browser share on desktop devices is less than 40%, and at least 8% of browsers are IE 9.
In other words, Array.forEach is now supported by around 70% of desktop browsers. Obviously, this figure varies considerably, depending on territory and other factors -- some regions or countries (such as Brasil) have a higher proportion of Chrome users, for example, and some (such as China) have far more users on IE6 and IE8.
I haven't checked, but mobile support (on WebKit and Opera browsers) may be even higher.
The JavaScript article of Wikipedia lists the JS versions by browser. forEach is part of JavaScript 1.6. So it is supported indeed by most browsers, except Opera 9.02 (which I just tested). Opera 9.5 (which I just installed!) supports it, along with indexOf for Array.
Surprisingly, it is not official. I don't see its support in the page ECMAScript support in Opera 9.5. Perhaps it is an overlook or perhaps only a partial support they don't want to advertise.
Since IE doesn't support it (not even v8), I use jQuery.each() -- http://docs.jquery.com/Utilities/jQuery.each
All modern browsers but IE.
The Microsoft AJAX client library adds this to the Array prototype so if you have that client library in your site then you'll have it for sure.
If you need all browsers to support this and other JavaScript 1.6 to 1.8 functions, I would suggest using the customizable jPaq library. The functions are implemented in the way that was suggested by Mozilla.
I have checked on caniuse.com and it looks like all browsers support foreach except Opera Mini which has support info as ?Support unknow. If you're interested you can use this link to check the browser support for any features. https://caniuse.com/?search=foreach

Categories

Resources