We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26401
    • 247 Posts
    I’m not sure of how this caching works still, and was hoping someone can shed some light.


    I have a document that has caching enabled, and most of the content is static except for a small [!script!]
    does that mean that the script is effectively canceling the whole caching operation, or does a part of the document still get cached ?

    and if I have this script on every page, is it even worth it to be caching at all?
      • 3749
      • 24,544 Posts
      Quote from: daspoda at Mar 05, 2010, 10:40 PM

      I’m not sure of how this caching works still, and was hoping someone can shed some light.


      I have a document that has caching enabled, and most of the content is static except for a small [!script!]
      does that mean that the script is effectively canceling the whole caching operation, or does a part of the document still get cached ?

      and if I have this script on every page, is it even worth it to be caching at all?

      The document is cached, but with the snippet tag (unprocessed) still in it. MODx will only have to process the snippet tag after getting the page from the cache so it’s definitely worth it.

      Of course, if the snippet always produces the same output, it should be cached as well.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 26401
        • 247 Posts
        Thanks BobRay,

        That snippet is there to give a log in/out depending on whether the user is logged in or not.

        I’m also seeing everything refresh on IE every time I load a page, even when the content is the same. Is there anything I can do about that?
          • 3749
          • 24,544 Posts
          Quote from: daspoda at Mar 06, 2010, 04:13 PM

          Thanks BobRay,

          That snippet is there to give a log in/out depending on whether the user is logged in or not.

          I’m also seeing everything refresh on IE every time I load a page, even when the content is the same. Is there anything I can do about that?

          It might be the IE configuration.
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 26401
            • 247 Posts
            Thanks for the reply, I did suspect that that was the culprit and checked before posting.
            I started another topic regarding this issue only.
            I’ve reset all my setting for IE7 and it still does it
            I’ve noticed that IE works fine with html sites, but tries to reload the content for all my modx sites.
            I’ve also tried some other people’s sites like http://prague-holiday-apartment.com/ that’s featured on the main site, and it does it there too.

            I can see the content blink on IE8, but it’s nowhere near as bad as IE7 and I can’t test on IE6, but think it might be similar.
              • 3749
              • 24,544 Posts
              Quote from: daspoda at Mar 07, 2010, 12:32 AM

              Thanks for the reply, I did suspect that that was the culprit and checked before posting.
              I started another topic regarding this issue only.
              I’ve reset all my setting for IE7 and it still does it
              I’ve noticed that IE works fine with html sites, but tries to reload the content for all my modx sites.
              I’ve also tried some other people’s sites like http://prague-holiday-apartment.com/ that’s featured on the main site, and it does it there too.

              I can see the content blink on IE8, but it’s nowhere near as bad as IE7 and I can’t test on IE6, but think it might be similar.

              Definitely worth tracking down.
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting
                • 26401
                • 247 Posts

                I went through all the settings again, and found that I did set it to check for newer versions automatically, which wasn’t reset in my last sweep.


                This fixes it, but Is there something being injected to the headers where the page thinks it is new perhaps? I still wonder why this wasn’t an issue for the static html pages, that IE was also checking to see if they changed.