Jump to content

CloudFlare settings


Recommended Posts

5 minutes ago, Jim M said:

Dynamic would be their configuration in CloudFlare they likely have set caching to be Dynamic there (aka not cached by CloudFlare).

You've lost me, why would they use Cloudflare but not want it cached by Cloudflare? @Day_ do you have any idea whats going on as I'm lost, I can't even see a setting for that.

This site also have the same Dynamic setting https://www.hmfckickback.co.uk/ whilst using Cloudflare.

So for some reason, mine is set to Bypass, whilst other sites show as Dynamic, but from what you're saying neither are doing anything.

Edited by marklcfc
Link to comment
Share on other sites

3 minutes ago, marklcfc said:

You've lost me, why would they use Cloudflare but not want it cached by Cloudflare? @Day_ do you have any idea whats going on as I'm lost, I can't even see a setting for that.

This site also have the same Dynamic setting https://www.hmfckickback.co.uk/ whilst using Cloudflare.

So for some reason, mine is set to Bypass, whilst other sites show as Dynamic, but from what you're saying neither are doing anything.

You would need to ask the website owner because I would not know that. There are thousands upon thousands of reasons to use CloudFlare so maybe they simply don't want guest caching or haven't configured it yet.

Link to comment
Share on other sites

2 minutes ago, Jim M said:

You would need to ask the website owner because I would not know that. There are thousands upon thousands of reasons to use CloudFlare so maybe they simply don't want guest caching or haven't configured it yet.

@Day_ at dcfcfans has got it set up like mine as he helped me, so surely something outside of cloudflare is making his dynamic and mine bypass.

Edited by marklcfc
Link to comment
Share on other sites

13 minutes ago, marklcfc said:

@Day_ at dcfcfans has got it set up like mine as he helped me, so surely something outside of cloudflare is making his dynamic and mine bypass.

You would need to review your server headers being passed as mentioned several time now 😉 . Something from your server is sending a nocache header thus creating this problem. 

Link to comment
Share on other sites

34 minutes ago, marklcfc said:

@Day_ at dcfcfans has got it set up like mine as he helped me, so surely something outside of cloudflare is making his dynamic and mine bypass.

At the.minute I’m not actually using Cloudflare caching, I have it set to bypass the domain at Cloudflare. Something somewhere is having a negative impact with Adsense, so experimenting to see what the issue is.

Link to comment
Share on other sites

3 minutes ago, Day_ said:

Just put it back on @marklcfc if you want to check mine vs yours, on my iPad so not able to look

Same as previously, still Dynamic (don't know whether thats good or bad, but better than Bypass which I have). cache-control is the same as mine though but I'm clueless, all I know is mine shouldn't be Bypass 😐

Could contain: File, Computer Hardware, Hardware, Electronics, Monitor, Screen, Text, Page

Edited by marklcfc
Link to comment
Share on other sites

Turning off the guest caching in cache rules has the same effect, so when thats active it turns into Bypass, on my site anyway.

I believe everything was set up correctly though (my settings on previous page)

Edited by marklcfc
Link to comment
Share on other sites

Can't understand how am I at 67% caching if my site is bypassing it? 

Just now, Day_ said:

Cloudflare issue then, not sure where as I have the same cache rules as you. You sure you have nothing set up in the page rules section?

Nothing at all, only added what I was advised to in this topic

Link to comment
Share on other sites

Just now, marklcfc said:

Can't understand how am I at 67% caching if my site is bypassing it? 

Remember...  there are multiple elements to a web page.  There is:

  • The base page itself
  • Images
  • Stylesheets
  • Javascripts

For example the forum homepage on this site...

Could contain: Page, Text, Number, Symbol

There are over 50 objects on the page.  Each of those objects could potentially be served from cache...  not just that very first base page.  

Now...  with that said, in addition to each object, there are hundreds of points of presence for Cloudflare.  Chicago, LA, DC, Paris....  each location has its own cache.  So an object might be in cache for a user in Chicago, but the first time it's called out of Paris, it is missed so it has to go fetch it and store it.  (Meaning the next one would be a hit.)

 

Link to comment
Share on other sites

37 minutes ago, marklcfc said:

Ok just done a test, I turned on Development mode in Cloudflare and it looks like this

Could contain: File, Computer Hardware, Hardware, Electronics, Monitor, Screen, Text

When turning off development mode, it looks like this

Could contain: File, Pc, Electronics, Computer, Text, Computer Hardware, Hardware, Monitor, Screen

So does this mean something in Cloudflare is doing it?

I'm confused by what you mean here, if you are turning on/off development mode you would expect to see a change for cf-cache-status because that is exactly what you are doing.

cache-control in both instances are set to "no-cache" which is coming from your server and what you are investigating here.

Link to comment
Share on other sites

Just so we're clear:

https://developers.cloudflare.com/cache/about/default-cache-behavior/

Quote

BYPASS

The origin server instructed Cloudflare to bypass cache via a Cache-Control header set to no-cache,private, or max-age=0 even though Cloudflare originally preferred to cache the asset. BYPASS is returned when enabling Origin Cache-Control. Cloudflare also sets BYPASS when your origin web server sends cookies in the response header.

DYNAMIC

Cloudflare does not consider the asset eligible to cache and your Cloudflare settings do not explicitly instruct Cloudflare to cache the asset. Instead, the asset was requested from the origin web server. Use Page Rules to implement custom caching options.

When you see a status of BYPASS, it means there was something overriding IPS' cache control header at origin that changed it's default values.

When you see a status of DYNAMIC, it means there is no rule to cache that asset.  You would need to define a page rule to cache it.  

Link to comment
Share on other sites

9 minutes ago, marklcfc said:

So am I right to have bypass to guests and dynamic to logged in? As that’s what it is currently

That would be incorrect. As mentioned, something from your server is overriding Invision Community's default cache-control header thus CloudFlare is respecting this thinking that you set it on purpose and thus, not caching the page and thus, returning Bypass. 

You will need to find out what is causing the cache-control to be set to no-cache and remove that on your server so that CloudFlare will cache the page and you will see the cf-cache-status set to a proper cache status (such as HIT or MISS).

Link to comment
Share on other sites

3 minutes ago, marklcfc said:

I’m at a loss then, hosts have said it’s sounding like a cloudflare issue. 

You have configured CloudFlare to respect headers from origin so it cannot be. You can even disable it via the Developer mode button I showed you to appease. As Randy mentioned too, it could be a third party resource on your Invision Community install causing this so you would want to disable those as well.

Link to comment
Share on other sites

The first thing I would do is disable all third party resources.  If possible, switch to a default theme.  (it should not matter, but just to eliminate it as a possibility).  

Go back into CF.  Clear cache.  Wait 30 seconds.  Log out of your site as a user....  (or use a different browser that does not have a session).  Load the page a few times and check the status.  

If it does not fix it, you most likely have something overriding the headers at the server level.  (Again...  check your htaccess to make sure it's exactly IPB's default.  Don't have extra stuff added there.)

I just literally setup a vanilla IPB instance on a fresh server on AWS.  With the basic setup provided above, the caching worked correctly for both guest and logged in users for base pages.  

Edited by Randy Calvert
Link to comment
Share on other sites

For comparison sake, does the other site I linked to earlier have the same issue?

cache-control: no-cache, no-store, must-revalidate, max-age=0, s-maxage=0

This shows on the other site as well, the only difference being the other site is DYNAMIC whether logged in or not, whereas mine is BYPASS when logged out.

Edited by marklcfc
Link to comment
Share on other sites

7 minutes ago, marklcfc said:

For comparison sake, does the other site I linked to earlier have the same issue?

cache-control: no-cache, no-store, must-revalidate, max-age=0, s-maxage=0

This shows on the other site as well, likewise mine and numerous others I've checked

That would be correct for logged in.

Whereas, logged out on a fresh install, I get:

public, max-age=31536000, no-cache="Set-Cookie", s-maxage=1800, stale-while-revalidate, stale-if-error

 

Link to comment
Share on other sites

Just now, marklcfc said:

Could ads be the issue? It’s the only thing we both have the same as far as add ons

If it’s JavaScript, likely not but don’t have anything to lose by testing and disabling everything to rule it out. There’s countless times I’ve wasted by saying “that can’t be it” and that was it so tule of thumb don’t exclude it before you’ve tested it 😉 

Link to comment
Share on other sites

  • Recently Browsing   0 members

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