How to Use Require.js to Load Javascript Libraries Asynchronously

Опубликовано: 13 Сентябрь 2016
на канале: Data Slayer
18,158
146

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 Require.js to Load Javascript Libraries Asynchronously онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Data Slayer 13 Сентябрь 2016, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 18,158 раз и оно понравилось 146 людям.