Jump to content

CloudFlare settings


Recommended Posts

  • 2 weeks later...

Hello! 

I have following question! 

for some time now, a company provided us these options for free (we are a non-profit)with cloudflare

  • Web Application Firewall (WAF)
  • Lossless Image Optimization
  • Accelerated Mobile Pages 

unfortunately they are closing this department so I am back to a free cloudflare setup. 

Do I need them back,  (how will I know that?) 

how should I setup the free cloudflare    in best practice to match invisionpower needs ?

I am just the owner, not a tech person . I have the controls of the cloudflare setup.  There are no people in my team who know things cloudflare anymore, and those that did did not know whats best to have with invisionpower.

I am hoping for your enlightening comments!!! 

 Is there a post perhaps in this topic that describes the best setup for free cloudflare for invisionpower?

thank you so much in advance!

Edited by MeMaBlue
Link to comment
Share on other sites

(in between 
I am reading posts.)  

I found this was recommended so I am posting it here , after I made the change. 

 

1. Cache configuration  :  Browser Cache TTL set to  Respect Existing Headers

Could contain: Page, Text

 

 

I mean we are a forum lets get all this basic advice together ? 🙏

If I find other generic tips I will post more here. 

Edited by MeMaBlue
Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...
  • 1 month later...

@Jim M I'm using those Cloudflare settings you mentioned a while ago, as well as restoring cache page timeout to constants.php but I've noticed when a viewing site as a guest it doesn't remember when changing to a different theme. and when clicking around it shows a mix of the theme I've changed to and the original default theme. Is there any way around this?

Edited by marklcfc
Link to comment
Share on other sites

  • 4 weeks later...

It doesn't work very well for me because the main page is displayed as logged out, and when I enter a section I am already logged in ... I cleared the cache and still the same problem, plus this error: The CSRF protection key does not match. This may mean that the plugin or theme is not up to date. Please contact technical support for more information.

Link to comment
Share on other sites

1 hour ago, Grafidea said:

It doesn't work very well for me because the main page is displayed as logged out, and when I enter a section I am already logged in ... I cleared the cache and still the same problem, plus this error: The CSRF protection key does not match. This may mean that the plugin or theme is not up to date. Please contact technical support for more information.

Sounds very much like a configuration issue. Would recommend verifying what you have configured and ensure it is as provided. You'll want to clear the cache in CloudFlare after this as it may have things incorrectly cached too.

Link to comment
Share on other sites

1 minute ago, Grafidea said:

@Jim M I tried 3 times, I cleared the forum cache and CloudFlare and there is still the same problem, it works fine for a while, after a while I log out and on the main page I am logged out and when I go to a section I am logged in..

 If you're testing your configuration, I'd advise using an incognito or private browser as suggested multiple times in this topic. There are cookies present if you have used the ACP which would impact your browsing experience which wouldn't impact others.

Otherwise, please post your configuration.

Link to comment
Share on other sites

  • 2 weeks later...

I'm using cloudflare with good results. One area I want to cache is the "pages" applications I've developed. Since nobody can post or add new items on this content, it would be great to treat it as regular html, and cache it as guest caching. The problem I have is that I put some rules for "Pages" content to be considered HTML, the logged in users are not consistent, they appear as "not logged", or worse logged as another user (due to caching). 

Is possible to keep the pages content static? My site is about astronomy and almost ALL pages content never ever changes. 

Thanks in advance!

Link to comment
Share on other sites

7 minutes ago, rfcontreras said:

Is possible to keep the pages content static? My site is about astronomy and almost ALL pages content never ever changes. 

Give those pages something you can key a cloudflare rule off of… for example they could all be in a folder called “articles” and set a rule where anything in that folder is force cached. Or set a .html extension on the page name and create a rule that force caches .html pages. 

Link to comment
Share on other sites

Hi Randy,

Thanks for your reply. I've already did that but the issue is with the logged in users, for example you're logged in (user "A") but if pages were previously cached by my user (user "B"), probably the cached version will have my name on it (user B), despite you're logged in as user A.

The same happens when the cached copied was fetched by a not registered user, if I browse, I appear to be logged off. 

My pages are very intensive with a lot of logic, so they're heavy and slow to load. I've also considered to move them to another platform and have them static for the sake of speed. 

For testing purposes I've added a rule in cloudflare to treat everything as static (breaks logged status), or enabled "Rocket Loader", but the menu does not work at all. 

I don't know how to disable the "logged or not logged" status for pages, since they're pointless for my apps.

Best regards

Ricardo

Link to comment
Share on other sites

Hi Randy, 

yes, these rules are included and content is being cached for guests. My point is to cache for everybody the pages content since never changes. 

Funny is that Cloudflare cache is working and pages takes no time to load (I guess due to the service worker), but the Pagespeed, webpagetest and gtmetrix benchmarks for guests show horrible numbers anyway. Even with several benchmarks the speed is the same.

Not comparing apples to apples, but I have a Magento site, extremely expensive in terms of resources, and having exactly the same technology (nginx, opcache, redis, mariadb, php8.1) the page experience is amazing, but on the Invision forum I get awful numbers.

Invision based Site

Could contain: Page, Text, Number, Symbol

Magento based Site

Could contain: Page, Text, Number, Symbol

At this point, I don't know what to do, show a stripped down version, remove functionality, disable plugins or default theme, etc. Nothing worked at all. 

I'm hosting in DigitalOcean with a big server, I've analyzed every portion of the page load, it's consistent around 1.5 to 3 seconds to load with my browser, but on synthetic benchmarks numbers are worse.

Honestly don't know what to do to improve the speed. On the continuous rise of social networks, we're losing subscribers, and on top of that this level of user experience is not good.

Best regards

Ricardo

 

 

 

 

Could contain: Text

Could contain: Page, Text, File, Webpage

Could contain: File, Webpage, Page, Text

Link to comment
Share on other sites

9 hours ago, rfcontreras said:

yes, these rules are included and content is being cached for guests. My point is to cache for everybody the pages content since never changes. 

Well the page DOES change if you are using the existing header which includes the currently logged in user.  If someone is logged in, they have a menu that shows them logged in. This disqualifies it from cache consideration. 

You would have to remove everything that is dynamic from the page including indicating they are logged in to do what you want. 

By the way… Google is viewing the page as a guest so it should be seeing a cached version of it. So logged in status is irrelevant. Logout, clear ALL cookies for site and reload the page. Look at the cachability headers. Paste a link if you are not sure. 

Edited by Randy Calvert
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...