尽管我已经清除了缓存,但在更新Magento 1.5的CSS文件时我看不到更改 [英] I can't see changes when updating css files for Magento 1.5 although I have cleared the cache

查看:86
本文介绍了尽管我已经清除了缓存,但在更新Magento 1.5的CSS文件时我看不到更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编辑了一个CSS文件并将其上传到我的Magento 1.5站点.我刷新了缓存,还刷新了浏览器缓存,但是我可以看到反映到站点的任何更改.我该怎么办?

I edited and uploaded a css file to my Magento 1.5 site. I refreshed the cache and also refreshed the browser cache but I could see any changes reflected to the site. What should I do?

推荐答案

您是否检查过Magento是否从正确的主题发送了正确的CSS文件? 这似乎是一个基本错误,但是它发生的次数比您想象的要多,尤其是在您拥有多个设计/主题文件夹的情况下.查看HTML的源代码,只需确保页面使用的是您修改过的CSS文件即可.

Did you check that Magento is sending the correct CSS file from the correct theme? This might seem like a basic mistake, but it happens more often than you think especially if you have multiple design/theme folders. View source of HTML and just make sure that the page is using the CSS file you modified.

如果magento没有发送正确的CSS, 检入admin-> System-> Design-> Themes-> Skin或您的phtml代码. 当您包含来自PHP(模板)代码的CSS文件时,请确保使用

If magento is not sending the correct CSS, check in admin -> System -> Design -> Themes -> Skin or your phtml code. When you include your CSS file from PHP(template) code, make sure you use

href="<?php echo $this->getSkinUrl('css/fileName.css')?>"

此外,您可以通过删除magento/var/cache/

Also, you can clear cache directly by deleting folders in from magento/var/cache/

如果Magento发送正确的CSS文件,那么您最后要做的就是从布局或phtml代码向CSS添加版本名称.只需将fileName.css转换为fileName.css?v = 01或其他内容,浏览器就会下载最新的更改.

If Magento is sending the correct CSS file, then the last thing you can do is adding a version name to the CSS from the layout or from phtml code. Just convert fileName.css to fileName.css?v=01 or something, then the browser will download the latest change.

希望其中之一可以解决您的问题.

Hope one of these will solve your problem.

这篇关于尽管我已经清除了缓存,但在更新Magento 1.5的CSS文件时我看不到更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆