pagespeed cache exp problem

Discussion in 'Apache' started by dethfire, Apr 12, 2010.

  1. #1
    I have this in my htaccess which is in my root www folder.

    
    # Turn on Expires and set default to 0
    ExpiresActive On
    ExpiresDefault A0
    
    # Set up caching on media files for 1 year (forever?)
    <FilesMatch "\.(ico|flv|pdf|mov|mp3|wmv|ppt)$">
    ExpiresDefault A29030400
    Header append Cache-Control "public"
    </FilesMatch>
    
    # Set up caching on media files for 1 week
    <FilesMatch "\.(gif|jpg|jpeg|png|swf|js)$">
    ExpiresDefault A604800
    Header append Cache-Control "public, proxy-revalidate"
    </FilesMatch>
    
    # Set up 2 Hour caching on commonly updated files
    <FilesMatch "\.(xml|txt|html|css|rss)$">
    ExpiresDefault A7200
    Header append Cache-Control "private, proxy-revalidate, must-revalidate"
    </FilesMatch>
    
    # Force no caching for dynamic files
    <FilesMatch "\.(php|cgi|pl|htm)$">
    ExpiresDefault A0
    Header set Cache-Control "no-cache, no-store, must-revalidate, max-age=0, proxy-revalidate, no-transform"
    Header set Pragma "no-cache"
    </FilesMatch>
    
    Code (markup):
    If I check my main page http://www.physicsforums.com with pagespeed it says almost all my items are cached. Good! However if I check a page link http://www.physicsforums.com/forumdisplay.php?f=149 then it says none are cache. What am I doing wrong? thanks!
     
    dethfire, Apr 12, 2010 IP
  2. coffear

    coffear Member

    Messages:
    31
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    43
    #2
    The htaccess file looks ok to me. I am unable to load the URL at the moment however just to double check. The 2nd url do the images etc have any session data in the links to them? If so this could be causing the issue.
     
    coffear, Apr 13, 2010 IP