When using yii, assets will publish resources to the assets directory according to the resources. The file directory name is such as "d82d0cc7yii.js". If the load balancing rule is polling, it may cause the resource name created by the current request to be on the current server, and the resource request is sent to another server, resulting in the resource not being loaded and the page being confused. How to deal with this?
I remember that Yii does hashing based on the last modification time of the file, so there are two ways:
1. Turn off Yii’s hashing of static resources and directly output the original file name (but this may cause the client to not update the static resources) )
2. Rewrite Yii’s implementation of hashing static resources (personally recommended)