SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: ie cache issues

  1. #1
    SitePoint Wizard lorenw's Avatar
    Join Date
    Feb 2005
    Location
    was rainy Oregon now sunny Florida
    Posts
    1,098
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    ie cache issues

    Hi all,

    I have a template system however when some users change themes the header and footer image dont change for them.

    Tried

    PHP Code:
    header("Cache-Control: no-cache");
    header("Expires: -1");

    and

    <
    META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <
    META HTTP-EQUIV="Expires" CONTENT="-1"
    Nothing seems to work and I don't have the problem.

    Would something like calling the image like header.jpg?id=someRandomNumber
    fixt the cach issues.

    php.net has many headers to prevent the cache and even found stuff at ms.com but nothing they recommend works.

    Thanks for any input.
    Cheers.
    What I lack in acuracy I make up for in misteaks

  2. #2
    SitePoint Member
    Join Date
    Jun 2007
    Location
    Gold Coast, Australia
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is it only occuring on the first load after the theme change or is it persistant?

    I assume the theme is being changed by switching stylesheets? How are the path to the images defined?

    It doesn't really sound like a caching issue to me because if you are switching between themes, the images are going to be loaded from seperate folders and therefore the IE cache will load the stored image with the corresponding path for the current theme.

  3. #3
    SitePoint Wizard lorenw's Avatar
    Join Date
    Feb 2005
    Location
    was rainy Oregon now sunny Florida
    Posts
    1,098
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    The themes are loaded into a "sites" directory with header.jpg and footer.jpg

    I've noticed that if a theme has header.jpg and a new theme has a footer.jpg it works fine. If another theme gets loaded with a new header.jpg and footer.jpg it still shows the old header and footer.

    The style sheet is a php file and does change the layout but the original header and footer remain the same.

    Changing themes moves the header and footer to the sites directory so the page always calls header.jpg and footer.jpg so ie decides it is the same image and displays the chache version because the name has not changed. Just guessing here but iwould solve the problem. Thats why I ask.

    The style changes because it has a different GET string going to it

    style.php? bgcolor=ffcc00

    And this works which is why I am curious if calling the header.jpg?id=random with a GET string will fix it.

    Thanks, this is what I have but I dont have the problem and am stabbing in the dark on this
    What I lack in acuracy I make up for in misteaks

  4. #4
    SitePoint Member
    Join Date
    Jun 2007
    Location
    Gold Coast, Australia
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah based on how you've described the site structure, passing a get string when calling the image should resolve the issue.

    Easiest way would be to call the image like 'header.jpg?'.time();

    Have you been able to narrow down to a specific version of IE?

  5. #5
    SitePoint Member
    Join Date
    Mar 2008
    Location
    Leeds, UK
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The query string method always comes up trumps for me

  6. #6
    SitePoint Wizard lorenw's Avatar
    Join Date
    Feb 2005
    Location
    was rainy Oregon now sunny Florida
    Posts
    1,098
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Thanks, Time() will be perfect. They were using ie7 from what I could tell.

    cheers
    What I lack in acuracy I make up for in misteaks


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •