8
9
10
11
Edge
Michael K Snead
2009
2011
2012
2013
2015
11
Edge
2013
2015
This means that everything <11 has already been dropped, all at once.
Today, I want to show you how that enables us as both developers and designers.
netmarketshare.com
40,000+ websites
As of 2/11/2016
statcounter.com
In September of 2015 alone measured 16.3 billion page views
As of 2/11/2016
w3counter
37,833 websites
As of 2/11/2016
Paylocity (via Google Analytics)
As of 2/11/2016
14,251,735 total sessions
6,208,728 in Internet Explorer
... a lot has happened in the last 5 years
jQuery 2+ drops support for IE8, removing lots of code that slows jQuery down.
If your library or framework depends on legacy jQuery features, you may be able to use jquery-migrate to keep the old API, but get the speed gains.
These frameworks (and more) don't support IE8, so dropping IE8 enables us to consider them as options.
React will be dropping IE8 in the next version.
IE11 has full support for ES5, so you could remove any ES5 shims. It can benefit from ES6-shim, however.
Also, you can remove html5shiv (or modernizr if you use it purely for HTML5 shivving).
respond.js is no longer necessary for media queries. Selectivizr no longer needed for CSS3.
placeholder.js no longer needed for placeholder.
Stop using ZeroClipboard, start using clipboard.js (no flash!)
We should be evaluating our shims, shivs and put our CSS on a diet!
Arrays
var numbers = [5,10,10,15,20];
numbers.indexOf(10); //outputs 1
numbers.lastIndexOf(10); //outputs 2
//Are all values more than zero?
numbers.every(function(value, index) { return value > 0; }); //returns true
//Is at least one value equal to 5?
numbers.some(function(value, index) { return value === 5; }); //returns true
//Get values < 15
numbers.filter(function(value) { return value < 15; }); //returns [5,10,10]
//Get the total count
numbers.reduce(function(prev, current) { return prev + current; }); //returns 60
//Below outputs "5 0", "10 1", "10 2", and so on...
numbers.forEach(function(value, index) { console.log(value, index); });
console.log(Array.isArray(numbers)); //true
var people = [
{ FirstName: "Mike", LastName: "Snead" },
{ FirstName: "Aaron", LastName: "Carlo" }
];
//Below outputs an array of objects with combined FullName only
people.map(function(value, index) {
return { FullName: value.FirstName + " " + value.LastName };
});
Objects
Additional
*You should be using "use strict" and Chrome 48 requires it for let/const.
When to use a Map:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map
Set stores "unique" values of any type, whether primitives or object references.
With "Weak" Map/Set, objects can be garbage collected.
(just what IE11 + Chrome + Firefox support that IE<11 didn't)
Everybody supports MPEG-4/H.264 videos.
Everybody supports MP3 audio.
Not much to say here.
Browsers keep their own dictionaries which the user can add/edit entries of.
Do you use iframes? Use this. You can...
From MSDN:
Embedding content with an IFRAME is like announcing a party publically on Facebook. You think you know who you invited, but really you have no idea who passed it on and who'll show up.
Disable any functionality your iframe content doesn't need.
While we will likely stick to 3rd party or citrus for much of this functionality, this may still be really useful in certain areas, such as mobile.
Features like "multiple file selection" provide benefits beyond citrus.
Did you ever want to run CPU intensive JavaScript on the browser without blocking the main/UI thread?
Now, you can do this.
"Threading" in the browser is event driven, so you don't need to worry about things like locks.
Your UI thread (where most JavaScript is run today) will block only when the worker notifies that it has new data.
Now you can create binary files in JavaScript, and even create links or download them to the client without touching the server.
With the FileReader API, you can actually read a file's contents (ie: files stored on the user's PC) right inside your JavaScript, without touching the server.
We can read files and create/download them in JavaScript ... and we can also upload them asynchronously / via AJAX. No more iframes!
Similarly, you can download files (no longer just text/JSON) and access them via JavaScript.
The XHR response can now (also) be DOMString, ArrayBuffer, Blob or Document.
There are a few other features with these new, native APIs:
WebSockets allow us to open fast, reliable TCP connections, without the overhead of stuff like HTTP headers, cookies, etc. Also, it's a full-duplex connection, meaning that the server can send messages to the browser.
WebSockets provide for less bandwidth and less latency.
WebSockets can be huge for scalability and also for real-time applications.
Google's Ian Hickson:
"Reducing kilobytes of data to 2 bytes...and reducing latency from 150ms to 50ms is far more than marginal. In fact, these two factors alone are enough to make Web Sockets seriously interesting to Google."
Configuration to reach 600k persistent connections
WebSockets work with today's firewalls, routers and policies, too!
Now, finally, we can use one font format for all browsers.
TTF fonts do need to be marked (a bit set in the file) as "installable" for IE. You can patch TTF fonts with projects like this one:
HTTP Strict Transport Security (HSTS) is an opt-in security enhancement that is specified by a web application through the use of a special response header.
HSTS addresses the following threats:
HTTP/2 is the future and is supported in IE11 + Windows 10.
SPDY is supported in IE11 everywhere else.
Both HTTP/2 and SPDY are focused on improving performance.
IIS in Windows <10 will need a proxy. ASP.NET 4.6 has explicit support for HTTP/2.
This provides native APIs in JavaScript to do things like generate keys, or encrypt/decrypt using algorithms like SHA-*, RSA, AES, HMAC, etc.
Potential use cases include multi-factor authentication, protected document exchange, document signing, protecting data integrity, secure messaging, etc.
When JavaScript is encountered on a page, the browser stops parsing HTML and will request the script and evaluate it before continuing.
The boolean async attribute on script elements allows the external JavaScript file to run when it's available, without delaying page load first.
The boolean defer attribute on script elements allows the external JavaScript file to run when the DOM is loaded, without delaying page load first.
http://www.growingwiththeweb.com/2014/02/async-vs-defer-attributes.html
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#Attributes
Although this may be obvious, IE11 is magnitudes faster than its predecessors ... at everything. This means we can build richer applications with fewer limitations.
Keep looking ahead!
Microsoft is getting proactive about killing off older versions of Windows. Edge brings much more along with it.
"...[for Windows 7 or Windows 8.1] Microsoft announced today that after July 17, 2017, only the "most critical" security fixes will be released for those platforms..."
Text
Thanks for your time.
Now go build something amazing!