Cache problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Gapan
    New Member
    • Jan 2012
    • 7
    • 4.1.x

    [Forum] Cache problem

    Not so long ago, I had an issue with the forum.
    New posts weren't shown. And so people always needed to refresh (CTRL+F5) to see the last posts. I had also other weird issues related to login/logout. For instance, sometimes it was noted that I wasn't logged, but after refreshing the page... I was.
    I don't remember when it happened, but at the time, I admit that I felt too lazy to fix that problem. But a lot of people were complaining about the issue, so I simply disabled the cache by changing the Settings (Cookies and HTTP Headers Options). Which solved the issue at the time (This proves it is a cache-related problem).
    The server is holding fine, but having no cache makes everything load slower for the users. So I'd like to put the cache back now.
    I removed the No-cache HTTP Headers to see if the problem were still here (I was actually hoping that it had been resolved by a previous update). But the problem is still here.

    I'm a bit at a loss about this, because I don't remember doing anything that could have provoked this bug, yet one day, it just started happening (Sadly, I can't remember when exactly).
    So, what could I do to solve this problem?

    Thanks for your help
  • BirdOPrey5
    Senior Member
    • Jul 2008
    • 9613
    • 5.6.3

    #2
    Do you have an .htaccess file? If so check it for anything that could be forcing browsers to cache content. You may also ask your host about this.

    As for vBulletin though I don't know why it would work you could try disabling GZIP HTML Output, in the same block of settings.

    Comment

    • Gapan
      New Member
      • Jan 2012
      • 7
      • 4.1.x

      #3
      The .htaccess file is empty.
      As for the host, I'm the one administrating the server (It's a dedicated). So I'm the one configuring apache.
      I already tried disabling GZIP encoding.

      I was wondering, could it be somehow provoked by the use of the mod_expires with apache?

      Comment

      • Wayne Luke
        vBulletin Technical Support Lead
        • Aug 2000
        • 74167

        #4
        Originally posted by Gapan
        I was wondering, could it be somehow provoked by the use of the mod_expires with apache?
        Yes. This tells browsers when to expired cached items. You should not send mod_expires headers with any php content. Javascript, images, CSS is all fine but not the .php extension.
        Translations provided by Google.

        Wayne Luke
        The Rabid Badger - a vBulletin Cloud demonstration site.
        vBulletin 5 API

        Comment

        • Gapan
          New Member
          • Jan 2012
          • 7
          • 4.1.x

          #5
          I used something similar to this (Not exactly the same time, but still close to this):
          <IfModule mod_expires.c> ExpiresActive on
          ExpiresByType image/gif "access plus 1 years"
          ExpiresByType image/jpeg "access plus 1 years"
          ExpiresByType image/png "access plus 1 years"
          ExpiresByType text/css "access plus 1 years"
          ExpiresByType text/js "access plus 1 years"
          ExpiresByType text/javascript "access plus 1 years"
          ExpiresByType application/javascript "access plus 1 years"
          ExpiresByType application/x-javascript "access plus 1 years"
          #ExpiresDefault "access plus 1 days"
          </IfModule>
          Then I activated the mod. But I didn't specified anywhere to cache php content. To me, it seemed obvious that php content shouldn't be cached since it's dynamic.
          Does this mean that some browsers decided to cache php content because of this?
          Is there a way to tell the browsers to never cache PHP content (And only PHP)?

          Comment

          • Wayne Luke
            vBulletin Technical Support Lead
            • Aug 2000
            • 74167

            #6
            #ExpiresDefault "access plus 1 days"

            If I read this right, it tells the browser to expire everything not otherwise listed for 24 hours. This would include PHP and HTML. Did you just comment that out or has it always been commented out? There are no .htaccess files in the path that override these settings?
            Translations provided by Google.

            Wayne Luke
            The Rabid Badger - a vBulletin Cloud demonstration site.
            vBulletin 5 API

            Comment

            • Gapan
              New Member
              • Jan 2012
              • 7
              • 4.1.x

              #7
              No actually, in my list it wasn't commented and was put to 2 days.

              I'll try without it.
              (And no, there's no htaccess)

              Comment

              • Gapan
                New Member
                • Jan 2012
                • 7
                • 4.1.x

                #8
                Okay that seemed to have been the problem.
                I solved it by putting this:
                ExpiresDefault A0
                Thanks for the help

                Comment

                widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                Working...