Hello everyone, In this blog I will discuss you how Magento 2 conveys the requirejs to load the JS module for the website page. Therefore it will improve the loading speed of the page.
When js is loaded from the server, the next time it is loaded from the browser’s cache. so, the speed will increase.Whereas, it is firm to improve developer product. Because when you edit the JS or the .html file of knockout, you want to clear the browser’s cache.
Here, I will explain you how to disable the cache in Magento 2. When you create an extension in Magento 2, you do not want to clear the cache of the browser.
Follow the below line in your section:
urlArgs: “bust=” + (new Date()).getTime() // Disable js cache
To your view/frontend/requirejs-config.js like this image:
After sorting the static-content, you can observe that line in pub / static / _evirizzares / predefined / … / … / requjs-confjg.js. So require.js config has been changed from now, you do not require to clear the browser cache when you build the extension in Magento 2.
Last Update: December 21, 2018