We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 50485
    • 56 Posts
    Dear all

    Noticed something bizarre over the last couple of days - changes to css are not updating immediately, or for hours in some cases. It doesn't help if I clear cache or regenerate URIs or flush permissions. It sometimes helps opening a different browser but not always.

    The only things that I have added to the site over the last couple of days are:


    • upgrade modx plugin
    • formit plugin
    • recaptchav2 plugin

    If anyone has any suggestions I would be very grateful as editing is rather difficult!

    Su
      • 17301
      • 932 Posts
      Is it possibly local/browser or even ISP cache?

      Try putting a query string at the end of your CSS file when you update it. ie:

      <link href="assets/css/style.css?17012017" rel="stylesheet" type="text/css">


        ■ email: [email protected] | ■ website: https://alienbuild.uk

        The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
        • 50485
        • 56 Posts
        Thanks LK. Tried as you suggest, but still not updating. It also the same whether I am working on my home mac or work PC.

        Any other suggestions most welcome.
          • 4172
          • 5,888 Posts
          did you change the query string, after updating the css?
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 50485
            • 56 Posts
            Hi Bruno17

            Re changing the query string - no I didn't change it. Have never had to use one before. What should I be changing it to? Do l rename/resave the css file after every update?

            Don't I need to find the reason this is happening?

            Do you think it could have anything to do with updating Modx

              • 30585
              • 833 Posts
              Is your CSS file a static asset or is it a MODX resource?

              You may also need to check your .htaccess file for rules targeting stylesheets, especially those with future expiry dates.
                A MODx Fanatic
                • 44195
                • 293 Posts
                Try using your browser 'refresh and overwrite cache' option. In Firefox it's Ctrl-F5 although if you use something different you'll need to look it up.

                If that works and you see the new CSS, then it's just your browser which had cached the old CSS file. Unfortunately while you can see the new one, others won't as it's still also in their browser cache.

                This is why others above suggested adding a query string to the end of your CSS file link, so the browser sees it as a new file and won't call upon the old cached one.
                This is most likely the cause.
                  I'm lead developer at Digital Penguin Creative Studio in Hong Kong. https://www.digitalpenguin.hk
                  Check out the MODX tutorial series on my blog at https://www.hkwebdeveloper.com
                  • 50485
                  • 56 Posts
                  Hi Murray

                  Tried Ctrl-F5 in Firefox - no luck. For me, it must be something I have done recently that had caused this as it was fine before I used the upgrade modx plugin, the formit plugin and the recaptchav2 plugin.

                  Has anyone else experienced any problems since the upgrade or in using the Upgrade Modx plugin?

                    • 50485
                    • 56 Posts
                    Hi Treigh

                    My stylesheet is a under files > assets
                      • 50485
                      • 56 Posts
                      My hosting provider has cleared cache at their end and still issue is not resolved. It is as if there is suddenly a time lag on any changes to the css file.