Answer the question
In order to leave comments, you need to log in
How to register js files and js blocks in Yii2?
There is a business card site with several pages.
There are scripts that are used throughout the site, I added them to Asset.
There are js files and blocks that are used only on one page (sliders, gallery, etc.).
How can I set the registration order for individual js blocks and files so that nothing conflicts?
Answer the question
In order to leave comments, you need to log in
ideally create another Assets, add the required there and set the dependencies
WAT? why? There are APC / opcache, which store opcodes that are ready for execution.
Or do you need html minification?
Before optimizing or compressing a PHP file, ask yourself a question! And in the future, if you need to refine the functionality or make changes to the code, can you figure out what you get as an output!
Service: htmlcompressor.com/compressor
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question