Web page loading issue

I have created a webpage and data are fetched from a doctype. My issue is whenever server is idle or webpage is not opened for more time and I am opening my webpage, fetching of data is not happening.

Is there any solution?

I assume you are asking for a way to keep content up to date as they change on the server. You can use frappe realtime to establish a socket connection.