css in firefox and ie is rendering old css file…chrome shows new css just fine


Tags: css

Problem :

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

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

PHP file:

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

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

<link rel='stylesheet' href='stylesheet/css.php?v=1327523109' type='text/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.

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.

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?



Solution :

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.


    CSS Howto..

    How to animate an image under a mask or a clip using html css and jquery?

    How to get a heading to scale with a image and keep spacing ratio html/css

    How to adjust items in an ordered list without affecting sub-lists?

    how to add mutiple values to jquery code

    How to add part of css property value through scope in ng-style in angular

    how to change css property of 2nd & 6rd DIV using jquery

    How to create a responsive popup using fancybox 2?

    How can I change opacity of an image in css without disturbing the overwritten text's opacity

    CSS - how not to scroll parts of the page? [closed]

    how to fadein an inline element as a block element

    Css radio buttons problem - How to style each radio button?

    How to modify CSS rules without adding style attribute?

    How to make links in line

    Yahoo news CSS, how to achieve behavior

    How to add an image to xml sheet using css

    How to Make A Fancy Arrow Using CSS?

    How to set a External SVG color in HTML using CSS?

    how to set equal font size in table cells for mobile device html pages

    How to call apk font use CSS in android?

    how to center image + text in an li Element

    Jquery: Show/hide menu with single button

    How to shield a HTML tag from CSS?

    This should be simple but want to do it right. CSS display:none; how to turn back on according to @media

    css responsive background image not showing

    How to insert a div in between flexbox rows and keep everything responsive?

    How to create slideshow in css without having to make more than one class?

    How to make div scalable by using percentage in CSS

    How to remove IconTabFilter icons using css?

    How can I apply same style from element that changes in HTML to one that doesn't change in HTML?

    How is this put in the center using CSS?