Answer the question
In order to leave comments, you need to log in
yii2 framework doesn't see changes made to js and css files?
Hello. I develop on a local PC using OpenServer and yii2.
When I start the server and start making changes to js or css files, these changes are not visible in the browser, the server sends the version of the files that was before the change.
When I change the file name and links in AppAsset, the changes after that begin to see.
I have it in my web config
'assetManager' => [
'class' => 'yii\web\AssetManager',
'linkAssets' => true,
'forceCopy' => true,//YII_ENV_DEV ? true : false
],
public $publishOptions = [
'forceCopy' => true
];
Answer the question
In order to leave comments, you need to log in
1. Run OpenServer with administrator rightsso that it can create symlinks.
2. In the configuration, set up the asset manager:
'assetManager' => [
'linkAssets' => true,
'appendTimestamp' => true,
],
I start making changes to js or css files, these changes are not visible in the browser, the server sends the version of the files that was before the change.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question