• Resolved bluisier

    (@bluisier)


    Hi,

    First of all thanks for developing this plugin! It looks super promising.

    After some delays, I finally had some time to test your plugin on one of my website with a nginx-proxy in front of nginx setup.

    I tried to follow your nginx instructions and installed the header more module and added the stuff you recommend to Overwrite the cache-control header and the Browser caching rules in my nginx config files.

    Everything seems to work fine as I can see the headers of your plugin in my network tab. If i’m in the admin area, x-wp-cf-super-cache-active is not there but when I’m not logged in it’s active. You can check on my website here –> https://novo-media.ch/

    But my issue is that somehow the first request always has cf-cache-status: DYNAMIC indicating that the page cache is not working.

    Do you maybe have an idea how I could fix this or what I did wrong?

    Thanks in advance for your help

    Best regards

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Contributor iSaumya

    (@isaumya)

    Hi @bluisier,
    Thanks for sharing your site URL and I’ve checked it. The DYNAMIC issue is happening because you are using a multilingual plugin which uses an extra cookie to manage the language selected. Screenshot: https://i.imgur.com/06wEmcU.png

    When Cloudflare sees an extra cookie (besides the default cf cookie) then it assumes that the page is dependent on that cookie value and hence provides a DYNAMIC content instead of providing a cached copy.

    The way you can resolve it is by either disabling your multilingual plugin or using the Strip Response Cookie option from the plugin settings and see if your page still works as it is intended.

    Personally, most of the plugin uses the cookies in a very bad manner and even use cookie where they can implement the same feature without using a cookie. For example, in case of a multilingual plugin, the language stays what you have selected as the default language until some user change the language intentionally and then it sticks to that language until the user changes the language again. So, for this case the browser Local Storage can easily be used without using a cookie and get the exact same output as the developer intended. Also, the language selection choice is not a secure content so can easily be stored in the browser Local Storage without any extra encryption. But I can’t change the developers if they don’t want to write quality code considering all the reparation of their choice.

    Hope this helps. ??

    Thread Starter bluisier

    (@bluisier)

    Hi @isaumya ,

    Thanks for the detailed answer! Really appreciate it.

    As I can’t deactivate my multilingual plugin, I activated the Strip Response Cookie as you suggested. From what I can see in the network tab, there is only the cloudflare cookie remaining but unfortunately the page caching is still not working as my first request always has cf-cache-status: DYNAMIC.

    If you have any other idea to solve this issue I would greatly appreciate it.

    Thanks a lot

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @bluisier,
    Can you please share 2 screenshots from your cloudflare acc?
    1. Go to the page rule section and share a screenshot of your page rules.
    2. Go to the caching section > Configuration > Browser Cache TTL section screenshot.

    Looking forwards to your screenshots.

    Thread Starter bluisier

    (@bluisier)

    Hi @isaumya ,
    Thanks again for the super fast answer. Really kind of you
    Here are the 2 screenshots you requested:

    Hope it helps

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @bluisier,
    Why the page rule is for https://novo-media.ch/wp/*?
    It is supposed to be https://novo-media.ch/*

    Thread Starter bluisier

    (@bluisier)

    Hi @isaumya ,

    Ohhh I thought this was a weird page rule but as it was the one automatically created by the plugin I did not changed it.

    I think I understand what happened… I use a WordPress Boilerplate called Bedrock (https://roots.io/bedrock/) which is similar to putting WordPress in its own subdirectory (it’s a “sub-folder” install which has many advantages). So I don’t exactly know how you create the page rule in Cloudflare but the additional /wp/ probably comes from that (maybe there is a way to fix that on your side).

    So I changed the page rule manually and now everything works perfectly I believe. When I’m not logged in, everything is cached but if I’m logged in the cache is bypassed which is great. I can use the top admin bar when I preview blog posts I’m writing. I don’t have cookies issues when I log in the admin etc… I can just get rid of W3TC now which is a great news.

    I will definitly take the time to let you guys a great review and I will update my blogpost about Cloudflare (https://novo-media.ch/en/web-optimization/cloudflare-free-cdn/) to include your plugin as it fixes all problems I had so far using free CF.

    Keep up the great work and thanks a lot for your help and super fast support!

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @bluisier,
    So happy to hear that. Looking forward to your review and article. ??
    Hey, @salvatorefresta when you come online, take a look at this auto page rule directory URL issue so that we can brainstorm about how this issue can be avoided.

    Thread Starter bluisier

    (@bluisier)

    Hi @isaumya ,

    As promised, I updated the post (I added a part dedicated to your plugin at the end of the blog post) and left a good reviews for you guys! Plus I did a donation to support the amazing work you do with this plugin. It works really well and I installed it on all my main websites already. Keep up the good work!

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @bluisier,
    Thank you so much I will look into the article as I get some time. The goal of this plugin is to ensure you do not need any other page caching plugin (free or paid) whatsoever. This plugin will single handedly beat any other page caching plugin out there. Also are you using the fallback cache option? If not, you should use that option and take advantage of it.

    As this is a pure page caching plugin you will need other plugins like Autoptimize for your CSS, JS optimization, image optimization etc. But you won’t need any other plugin for page caching and taking full advantage of Cloudflare’s amazing network and CDN technology.

    Plugin Contributor Salvatore Fresta

    (@salvatorefresta)

    Hi guys,
    I already know about this issue and it was fixed on upcoming release ??

    Thank you!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘1st request page cache is not working’ is closed to new replies.