静态资源加修改时间版本号,修复部署后浏览器缓存旧 JS 的问题
页面 JS/CSS 引用统一改为 asset_url()(附加 ?v=filemtime): 部署更新文件后浏览器自动拉取新版本,避免出现"新按钮点击无反应"等旧缓存现象。
This commit is contained in:
1 parent
3a13656cfb
commit
dbf70f602e
24 files changed
+53
-42
No files matched your search
@@ -88,7 +88,7 @@ include __DIR__ . '/../includes/header.php';
|
||||
<?php endif; ?>
|
||||
|
||||
<script>window.PAGE_CONFIG = { role: '<?php echo htmlspecialchars($role, ENT_QUOTES, 'UTF-8'); ?>' };</script>
|
||||
<script src="/assets/js/dashboard.js"></script>
|
||||
<script src="<?php echo asset_url('/assets/js/dashboard.js'); ?>"></script>
|
||||
|
||||
<?php if (has_perm('manage_upgrade')): ?>
|
||||
<script>
|
||||
|
||||
Reference in new issue
Block a user