Hi all,

I have WordPress blog, problem is that when we upload new content and browse the blog the latest change won't appear on blog until unless explicitly refresh the page after opening a blog.

Here is the blog URL: https://corevoila.in/

Any help or clue will be appreciated

Thanks

Re: Explicit refresh - https://corevoila.in/ 80 80

Seems like this happens a lot. Some call it a bug but browsers do cache content so yes, you'll have to refresh on your PC.
Others will see new content when the cache expires.

Check out your Page Cache setting. https://wordpress.org/support/topic/page-cache-expiration-time/

You should not set this too low. Otherwise you can run into issues with your hosting. They may charge you for higher use.

Re: Explicit refresh - https://corevoila.in/ 80 80

As wordpress uses php, php is server side actions which means the blog will update etc on your server, you will have to explicitly refresh the page to run the browser side again to show the updates. You can do this using javascript, similar to something like this -

<script type="text/javascript">
        function refresh_my_page() {            
            var mysite = "https://mysite.com/";
            var page_refresh = "mypagetoshoworrefresh.php#";
            var my_blog_id = "bloginfo?id=";
            //my_blog_id will be latest blog you added to your table, grab the id from your php page, 
            //add it to your url and then re-load the url to show the
            //actual blog post thatw as just added...

            var url_go_to = mysite + page_refresh + my_blog_id;
            window.location.href = url_go_to;
            location.reload();          
        }
    </script>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.