云加速

解决ecshop清除缓存css样式没反应问题

折月煮酒 提交于 2020-03-03 09:36:31
部分浏览器例如谷歌或360等双核浏览器会对商城的css样式进行缓存,导致修改了css样式文件也没有更新。 ecshop模板 提供解决方法,修改后效果如下: 解决方法: 修改includes/init.php 找到 if (!empty($_CFG['stylename'])) { $smarty->assign('ecs_css_path', 'themes/' . $_CFG['template'] . '/style_' . $_CFG['stylename'] . '.css'); } else { $smarty->assign('ecs_css_path', 'themes/' . $_CFG['template'] . '/style.css'); } 修改为: if (!empty($_CFG['stylename'])) { $smarty->assign('ecs_css_path', 'themes/' . $_CFG['template'] . '/style_' . $_CFG['stylename'] . '.css?'.time()); } else { $smarty->assign('ecs_css_path', 'themes/' . $_CFG['template'] . '/style.css?'.time()); } 修改后,style