Answer the question
In order to leave comments, you need to log in
Is it possible to change the order in which assets are loaded for a specific page?
in web.php
'bundles' => [
...
'yii\bootstrap\BootstrapPluginAsset' => [
'js' => [YII_ENV_DEV ? 'js/bootstrap.js' : 'js/bootstrap.min.js',]
]
Answer the question
In order to leave comments, you need to log in
The defer attribute
Supported by all browsers, including the oldest IE. The script also runs asynchronously, does not make the page wait, but there are two differences from async.
First, the browser ensures that the relative order of defer scripts is preserved.
That is, in such code (with async), the script that loads first will work first:
<script src="1.js" async></script>
<script src="2.js" async></script>
<script src="1.js" defer></script>
<script src="2.js" defer></script>
<script src="async.js" async></script>
<script src="defer.js" defer></script>
текст текст текст
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question