在Firefox中的CSS,即渲染旧的CSS文件...铬显示新的CSS就好了 [英] css in firefox and ie is rendering old css file...chrome shows new css just fine

查看:43
本文介绍了在Firefox中的CSS,即渲染旧的CSS文件...铬显示新的CSS就好了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于某种原因,我无法在Firefox或浏览器中使用新的CSS.

For some reason I can't get the new css to be used in firefox or ie's browser.

我正在使用php将所有CSS整合到一个文件中,然后像这样输出:

I am using php to consolidate all the css into one file, then output it like so:

PHP文件:

header('Content-type: text/css');
readfile('layout.css');
readfile('a.css'); //jqueryUI

这是我从HTML端调用它的方式:

Here's how I call it from the HTML side:

<link rel='stylesheet' href='stylesheet/css.php?v=1327523109' type='text/css'   />

"v" querystring参数只是我在另一个搜索问题时获得的技巧中的php time()函数.希望time()会欺骗浏览器,使其无法加载缓存版本,但是它无法正常工作,并且仍在加载旧的CSS.

The "v" querystring parameter is simply a php time() function from a tip I got on another search for the problem. Hoping the time() would trick the browser into not loading the cache version, but it is not working and still loading the old css.

当我查看Firebug的CSS文件时,它显示了旧的CSS文件.但是,如果我直接通过url访问.css页面,则浏览器屏幕的输出将显示所有新的CSS代码.

When I look in firebug's css file it shows the old css file. However if I directly access the .css page through the url, the output to the browser screen shows all the new css code.

如果我在chrome浏览器中呈现相同的页面,它将显示新的CSS,而没有任何问题...但是,而ff显示旧的css.

if I render the same page in the chrome browser it shows the new css without any problem...but ie and ff show the old css.

我不知道发生了什么以及如何解决.谁能帮我吗?

I don't understand what's going on and how to fix it. Can anyone help me?

推荐答案

我尝试了CTRL + F5,清除高速缓存,然后重新启动...这些都不起作用.然后,我决定更改readfile()函数的css.php文件内部的顺序.一旦我移动了订单,就触发了新的CSS加载.我不知道为什么会这样,但是现在加载了新的CSS.

I tried CTRL+F5, Clearing the cache, rebooting...none of that worked right. Then I decided to change the ordering inside the css.php file for the readfile() functions. Once I moved the ordering around it triggered the new css to load. I don't know exactly why this worked, but now the new css loaded.

决定在此处回答此问题,以防其他人遇到类似问题并且传统的缓存清除无法解决该问题.

Decided to answer this here in case someone else comes accross a similar problem and the traditional cache clearing doesn't fix it.

这篇关于在Firefox中的CSS,即渲染旧的CSS文件...铬显示新的CSS就好了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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