Created
November 28, 2012 01:04
-
-
Save marcoslhc/4158322 to your computer and use it in GitHub Desktop.
Non Blocking Javascript mercurytide whitepaper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- | |
Original from http://www.mercurytide.co.uk/news/article/how-improve-site-speed-part-1/ | |
Modified by @author:Marcos Hernández; @email:marcoslhc@gmail.com | |
now you can load many libraries. The pattern follows order of requirements so the required libraries | |
must be declared first in libs[] | |
@Autor: Marcos Hernández @email:marcoslhc@gmail.com" | |
@Licencia:" | |
Está obra está sujeta a la licencia " | |
Reconocimiento-NoComercial-CompartirIgual 3.0 Unported de Creative Commons." | |
Para ver una copia de esta licencia, visite " | |
http://creativecommons.org/licenses/by-nc-sa/3.0/." | |
--> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<script type="text/javascript"> | |
(function () { | |
var libs = [{ | |
name:"non-blocking", | |
version:"1" | |
url:"js/non-blocking.js" | |
}] | |
for(var i=0; i<libs.length;i++){ | |
var script = document.createElement('script'); | |
script.type = 'text/javascript'; script.async = true; | |
script.src = libs[i].url; | |
var s = document.getElementsByTagName('script')[i]; s.parentNode.insertBefore(script, s); | |
} | |
})(); | |
</script> | |
. . . snip . . . | |
</head> | |
<body></body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment