Randy Calvert Posted February 23, 2023 Posted February 23, 2023 Put your site in development mode, clear the CF cache, then run the test again. MeMaBlue and SeNioR- 1 1
MeMaBlue Posted March 7, 2023 Posted March 7, 2023 (edited) 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 March 7, 2023 by MeMaBlue
MeMaBlue Posted March 7, 2023 Posted March 7, 2023 (edited) (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 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 March 7, 2023 by MeMaBlue
MeMaBlue Posted March 7, 2023 Posted March 7, 2023 I read that there are some page rules that are recommended for CF + invisionpower. Did I read right? is there anyone who can post them here ?
Daddy Posted March 15, 2023 Posted March 15, 2023 Trying to setup guest caching but I'm not able to get any of the cookies to work for me. I have if cookie = ips4_member_id but it still caches if you're logged in. Same for ips4_loggedIn
nodle Posted April 11, 2023 Posted April 11, 2023 I have been reading though this thread today. A nice little tool for checking if Cloudflare is working or not is the add-on Dr.Flare. It makes things easy to diagnose. Dr.FLARE - Chrome Web Store (google.com) Clover13 and MeMaBlue 2
marklcfc Posted June 7, 2023 Author Posted June 7, 2023 (edited) @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 June 7, 2023 by marklcfc
Daniel F Posted June 7, 2023 Posted June 7, 2023 1 minute ago, marklcfc said: Is there any way around this? There's no way around this, the best solution would be to have only one theme for guests.
Grafidea Posted July 1, 2023 Posted July 1, 2023 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.
Jim M Posted July 1, 2023 Posted July 1, 2023 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.
Grafidea Posted July 1, 2023 Posted July 1, 2023 @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..
Grafidea Posted July 1, 2023 Posted July 1, 2023 Same on phone and computer. So I don't think it's the browser's fault.
Jim M Posted July 1, 2023 Posted July 1, 2023 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.
Grafidea Posted July 1, 2023 Posted July 1, 2023 (edited) My setting: VIDEO: Please look Edited July 1, 2023 by Grafidea
SeNioR- Posted July 1, 2023 Posted July 1, 2023 change "does not equal" to does not contain" Grafidea 1
Daddy Posted July 15, 2023 Posted July 15, 2023 How do you get around guest caching sending guests to an error page when clicking accept or reject cookies with the latest changes to the cookie notice?
rfcontreras Posted July 16, 2023 Posted July 16, 2023 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!
Randy Calvert Posted July 16, 2023 Posted July 16, 2023 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.
rfcontreras Posted July 16, 2023 Posted July 16, 2023 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
Randy Calvert Posted July 16, 2023 Posted July 16, 2023 Did you add the rules above to prevent content from being cached for logged in users into your rule? If the user is not logged in (specified cookies don’t exist) and the type is HTML, cache the page.
rfcontreras Posted July 16, 2023 Posted July 16, 2023 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 Magento based Site 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
Randy Calvert Posted July 17, 2023 Posted July 17, 2023 (edited) 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 July 17, 2023 by Randy Calvert
Recommended Posts