Sometimes many people write, publish, access the article, but cannot view it on the homepage. Why is the text that can be viewed on the published line not visible on the homepage? We are writing this article to explain one of the most important reasons for this. We hope it solves your problem.
How does WordPress work?
WordPress is a blogging software. It needs a hosting to use. Files are uploaded to the place where you will host the site. Files run and viewed through that server. Most bloggers use several methods to speed up their site and minimize server usage. A few optimizations are required to increase the gtmetrix and pagespeed insight scores. The most important of these is to use CDN.
What is a CDN?
To put it simply, those who want to view your site go to the server where you get CDN service before your servers and view your files from there. This allows faster viewing of both your site as it blocks the attack and caches your site's files. The files of the cached site can be viewed by the other party without any query, that is, without consuming data. For this reason, CDN is used for optimization, which now reacts faster to the visitor. This is where trouble occurs.
Files are not displayed due to cache.
You wrote an article, it was published, but it does not appear on the homepage. This is because the CDN shows you the cache it keeps in its memory. It has not been long before the cache will change for you to detect the change, but a visitor entering your site for the first time can see your post, but a cached visitor cannot see it.
Decide for yourself how this should work. You can make the setting on the site where you bought your own CDN service as follows.
The image shows the interface of Cloudflare. In this section, Browser Cache Expiration option in the Cache tab prevents you from seeing the changes on the site. But it's okay, even if you can't see the changes there. However, this may affect your visitor experience, because a person revisiting your site will not be able to see the changes because it will also display files from the cache. For this, it will be useful to shorten the browser cache expiry time a little. Set this up according to how often you make changes on the site.
This problem is fixed by doing ctrl + f5 to the page. Because already this command clears the browser cache and refreshes the page.