posts with tag requirejs
Use RequireJS in Your Site
2015-09-12
<script src=”/script/Script.js”></script> ? require(“Script”); ? For most of the websites that you visit everyday, the JavaScript is not only a additional way to promote user experience but also a required method to let the site works as expectation. Nowadays, in such a so called “web 2.0” era, what is loaded and rendered by a browser is not a traditional document-like web-page but a modern program-like web-application. And since the HTML5 and CSS3 ( as well as other “live standands” ) became widely used in most websites form top of Alexa ranking to those personal blog (like this), it’s rare to meet a pure static site(in terms of client end). The scorces drive all of world of web is in JavaScript, our hero. However, just as the name, “JavaScript”, indicates that it’s initial goal is only provide some simple way for website to use, JavaScript is not designed for large scale application. The conflict between the autologous fault of the language nature and the raising demand of a suitable language led to various solutions. Here in this post, I would like to talk about some things about RequireJS, a JavaScript file and module loader who modulize JavaScript code snippits and load them asynchoronously in the standand browswer environment.