我需要在Thesis Framework中强制刷新custom.css(I need to force a refresh of custom.css in the Thesis Framework)

编程入门 行业动态 更新时间:2024-10-27 21:24:03
我需要在Thesis Framework中强制刷新custom.css(I need to force a refresh of custom.css in the Thesis Framework)

有谁知道在论文中刷新custom.css的最佳方法? 我遇到了一个问题,由于custom.css的浏览器缓存,我的某些css没有得到实现。 我尝试在文件名中添加一个变量,如“custom.css?v = 1”,虽然这样可行,但每次加载页面时都会出错。 任何帮助,将不胜感激。 提前致谢。

Does anyone know the best way to refresh custom.css in Thesis? I'm running into a problem where some of my css isn't getting implemented due to browser caching of custom.css. I tried adding a variable to the filename like "custom.css?v=1" and while this works, it gives me an error every time I load the page. Any help would be appreciated. Thanks in advance.

最满意答案

您可以通过将此过滤器添加到custom_functions.php文件来禁用CSS缓存。

function cache_customcss() { return true; } add_filter('thesis_cache_query','cache_customcss');

You can disable CSS caching by adding this filter to the custom_functions.php file.

function cache_customcss() { return true; } add_filter('thesis_cache_query','cache_customcss');

更多推荐

本文发布于:2023-07-17 07:52:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1141281.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:custom   Framework   Thesis   refresh   force

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!