Cloudflare does not automatically refresh page

Tried to search, but cannot find how to resolve this.

we have a website and the team tried to migrate to cloudflare last week, and most of it work, except that the page does not automatically refresh, so every time a user logs in or updates something, he/she needs to press f5.

on the original site and hosting with its own dns, it works well, without having to press f5.
Also we tried with another domain name on cloudflare, to direct to same hosting and also with other site it does not work. the automatic refresh works only on original hosting, but with cloudflare not. We also switched off the proxies on cloudflare dns, so it is not even using the caching, but still does not work. there is something wrong with using a proxy?

the only difference we can think off is the .htaccess file, is there an error there that does not allow automatic refresh on cloudflare, but does allow refresh on original hosting without cloudflare dns?

can someone help us?

the .htaccess file is

RewriteEngine On
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^www. [NC]
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

DirectoryIndex index.php

RewriteEngine on

RewriteRule (.)_version(.).css$ /1.css [L] RewriteRule (.*)_version(.*).js /$1.js [L]

RewriteCond %{REQUEST_URI} ^/(xinfo.php) [OR] RewriteCond %{REQUEST_URI} ^/(googlece2c5ae71b32f4bb.html)
RewriteRule ^.* - [L] </IfModule> <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*) index.php?url=$1 [QSA,L]

# compress content with type html, text, and css AddOutputFilterByType DEFLATE text/css text/javascript application/javascript application/x-javascript text/js # properly handle requests coming from behind proxies Header append Vary User-Agent


ExpiresActive On ExpiresByType image/jpg "access 1 year" ExpiresByType image/jpeg "access 1 year" ExpiresByType image/gif "access 1 year" ExpiresByType image/png "access 1 year" ExpiresByType text/css "access 1 month" ExpiresByType text/html "access 1 month" ExpiresByType application/pdf "access 1 month" ExpiresByType text/x-javascript "access 1 month" ExpiresByType application/x-shockwave-flash "access 1 month" ExpiresByType image/x-icon "access 1 year" ExpiresByType video/mp4 "access plus 1 year" ExpiresDefault "access 1 month" ## EXPIRES CACHING ## Header set Connection keep-alive Header set Cache-Control "max-age=2592000, public" Header set Cache-Control "max-age=1209600, public" # css and js should use private for proxy caching Header set Cache-Control "max-age=86400, private" Header set Cache-Control "max-age=86400, private" # # Header set Cache-Control "max-age=600, private, must-revalidate" #

<filesMatch “.(woff|woff2)$”>
Header set Cache-Control “max-age=31536000, public”

<filesMatch “.(mp4)$”>
Header set Cache-Control “max-age=604800, public”

We have been trying now for almost 2 weeks to get Cloudflare to work, but it does not work.

we have and when we moved to Cloudflare, it stopped working properly, e.g. if you change the currency in top header, it does not update the currency anymore. Userlogin name is not refreshed etc. Even just turning on “DNS only” does not work. We had to move back this domain to original hosting provider.

We used another test domain name and put that on Cloudflare, pointing to same hosting and website as guerra-creativa. And again the refresh using Cloudflare DNS does not work of changing currency or changing other things.

So, the same site works on original hosting DNS (see but NOT on Cloudflare DNS (see You can see these 2 sites and the currency does refresh in guerra-creativa but not in covid19compare, even though they are pointed both to same website.

Does anyone see the difference, because we cannot find why it does not work on Cloudflare

I can see a CORS error on the second site using Google Developer Tools Console View,

Failed to load No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘’ is therefore not allowed access.

This article may help, Specifically:

If you add or change CORS configuration at your origin web server, purging the Cloudflare cache by URL does not update the CORS headers. Force Cloudflare to retrieve the new CORS headers via one of the following options:

  • Change the filename or URL to bypass cache to instruct Cloudflare to retrieve the latest CORS headers.
  • Use the single-file purge API to specify the appropriate CORS headers along with the purge request.
  • Update the resource’s last-modified time at your origin web server. Then, complete a full purge to retrieve the latest version of your assets including updated CORS headers.

And, it looks like you need to click the :grey: on the A record in your DNS tab to turn them :orange:, Deprecated - The DNS App

Many thanks Cloonan,
we added to .htaccess file:
Header set Access-Control-Allow-Origin “*”
Header set Access-Control-Allow-Methods “GET,PUT,POST,DELETE”
“Content-Type, Authorization”

but still does not work. the blueconic line was old, and programmers removed it.

It looks something specific with Cloudflare DNS, because we tried 4 scenarios all point to the same IP address of the hosting provider.

  1. domain registered on hosting provider DNS, , when you change currency, it updates it.

  2. when we do https:// IP address of website , when you change currency, it updates.

  3. a subdomain registered at google DNS with, with A record pointed to IP addess >> when you change currency, it updates.

  4. using Cloudflare DNS with A record pointed to IP address, when you change currency, it does NOT update,

we are looking for the error, because it affects a lot of functionalities but we cannot find it, why only on Cloudflare DNS it does not work.

we cannot find the error, the team is quite desperate at this stage

you can see the error better on, you see the products below do not update the price in the new currency, but on https://IP address /es/products and Crea un concurso de creación de logo | Guerra Creativa it works

we still cannot figure it out, it is getting urgent as we have a lot of people looking at it, the datacenter hosting and developers team,

Still no luck, we put 2 domains on clouflare to test, and new one works and older one not:

  1. >> if you change currency in top bar, it does not update the currency in top bar nor on the products below.
  1. >> if you change currency in top bar, it does update the currency in top bar and on the products below.

Both have same Cloudflare DNS records (2 A records www and @ pointing to same IP address). One works, other one not.

I was reading on purge cache , and purged completely cache from webmenu on covid19compare. BUt still to no avail. Not sure if needs a deeper purge?

there must be something there maybe cached?

we tried to move our website to Cloudflare but it did not work properly, so we had to move back.

so we set up a test domain ( ) and tested, and also there it does not work properly. the problem is that in if you change the currency, it does not update the new amounts on the page. that was a while ago, and turned off settings, but to no avail.

we used another domain ( ) and started with just few features (not minify js, no use of rocket etc) , and there it works. you change the currency, and updates the products in new currency.

both domains point to same webserver backend, so it is exactly the same, just covid19compare is older and we put some bad settings, but returned it back. Did a full purge both today again,

can someone see any difference and why is working and the other one not?

This topic was automatically closed after 14 days. New replies are no longer allowed.