HomeНаука и техникаRelated VideosMore From: Macgyver

How to Use Require.js to Load Javascript Libraries Asynchronously

31 ratings | 2896 views
Require.js RequireJS is a JavaScript file and module loader. It is optimized for in-browser use, but it can be used in other JavaScript environments, like Rhino and Node. Using a modular script loader like RequireJS will improve the speed and quality of your code. http://requirejs.org/ (http://requirejs.org/) Asynchronous Module Definition (AMD) The Asynchronous Module Definition (AMD) API specifies a mechanism for defining modules such that the module and its dependencies can be asynchronously loaded. This is particularly well suited for the browser environment where synchronous loading of modules incurs performance, usability, debugging, and cross-domain access problems. Performance When it comes to application or web page speed and performance, loading scripts asynchronously is of utmost importance. This allows the browser to render the page without waiting for resources to load. Synchronous XMLHTTPRequest Deprecation Browsers are deprecating synchronous AJAX requests among other methods in order to encourage developers to use asynchronous programming methods when issuing network requests. Full Blog Post: https://askmacgyver.com/blog/tutorial/how-to-use-requirejs-to-load-javascript-libraries-asynchronously
Html code for embedding videos on your blog
Text Comments (0)

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.