Network tab shows cached at times only

Hi Team,

We have enabled caching for wp-content/uploads folder so that all the images/uploads are cached and the load time is reduced a little.

However when we check the Network tab of chrome (inspect) we see that the media is not cached and is only cached at times. Example: When you open https://www.pcstudio.in you will see that the image etc load from origin and the size shows in kb and time lines also increase. When you just refresh the page it again loads from the cache.

Is there any way that we can check this and fix & load the website media & content through cache only all the time?

Thanks
Shashikant

Hi @user9129,

That seem to be expected behaviour. The cache in each datacenter is independent and will only be populated when the site is loaded. Future requests will then be served from the cache unless the cache is purged, the TTL is reached or the resource is not accessed often, so Cloudflare removes it.

Hi @domjh,

Thanks for the revert.

Just one thing wanted to check, my analytics in the dashboard show that some bandwidth is still uncached. Is there any way that we can check what is that data & cache that too?

Also, can we change the TLS to 1.3 as most of the hits are shown under that and in the dashboard it’s set to 1.1 default.

Thanks
Shashikant

The uncached is most likely the initial requests before the cache is populated and any parts of the site that are not cached, like the HTML or dynamic content.

With the TLS versions, it is the minimum version, rather than the default, that you can choose in the dashboard. You can change it as you wish, but bear in mind that not all clients support the newest 1.3 so may then be unable to connect if you set the minimum to that.

Ok.

Let me check.

Also, the http request header in the console also shows the request status code 301 (https://pcstudio.in) at times and when we refresh it shows status code 200 (https://www.pcstudio.in).

Do you recommend any changes in www and non www redirection or this is the usual behavior?

Thanks
Shashikant

Apart from this can you please help me with one last thing?

I have enabled Minify option of HTML, JS & CSS from the cloudflare dashboard but that doesn’t seems to be working.

Is there any way that we can see if it’s working or not. In the network tab I can see all the JS & CSS files separated.

Please help!

Thanks
Shashikant

That looks fine, the 301 is just a redirect to www, which then loads.

This support article may help:

How do you know it’s not working?

You can check the response header:

image

Yes. I have again checked it in the response header. This “cf-bgj: minify” is not seen anywhere.

Is there anything else I missed out to do in the cloudflare dashboard?

Maybe try clear the CDN cache. The settings might only take effect after you purge the cache.

I have tried to clear the CDN cache from dashboard “Purge all” option. Still I am not able to see that minify in the header response.

Also, few images on the home page are not loading after purging the cache.

Do you have a sample URL for the CSS or JS file?

Sorry I couldn’t get what you are asking. Sample URL for CSS & JS file means?

You can check the home page https://www.pcstudio.in/

I checked your website and most of the CSS files are already come with minified format (min.js), so Cloudflare will not minify the CSS files again.

But I do see some unminified CSS files and Cloudflare does minify them…

Check these few URLs:

https://www.pcstudio.in/wp-content/plugins/jet-menu/assets/public/js/jet-menu-widgets-scripts.js?ver=2.0.9

https://www.pcstudio.in/wp-content/plugins/jet-tricks/assets/js/lib/tippy/popperjs.js?ver=2.5.2

https://www.pcstudio.in/wp-content/plugins/jet-tricks/assets/js/lib/tippy/tippy-bundle.js?ver=6.3.1

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.