Child/opener page sometimes returns a blank page after reloading/refreshing the same child/opener in JavaScript

When I open a child window from a parent window, I want it to reload after saving but sometimes the child window returns a blank page.

I want to reload the child window independent of the parent window action. child window returns blank only in Chrome.

The code should work in both Chrome and firefox.

My code that I have included is in the child window:

setTimeout(() => location.reload(true), 2000);

First of all, are you getting any errors showing up in your chrome dev tools console window(s)? Check both windows.

Second, what is being refreshed in the child? What are you loading into it? Could that possibly be throwing an error? For instance, if you are reloading a PHP script in that window and it comes up blank, it may be logging a PHP error on the server.

No errors in your chrome dev tools console window(s).

what is being refreshed in the child? — The whole child window i-e reload the whole child window when SAVE clicked from the same child window.

No I am asking what type of page are you loading in the window. Is it a PHP page? A page to google? A page to that really great dog toy on Amazon? What is the content you are loading/refreshing in the window? That page itself could be erroring and causing it to be white/blank.

jsp page.

Ok so have you checked that the jsp page is not producing an error on the server when you attempt to reload it?

The jsp page is not producing any error on the server.

It sounds like you might be encountering a challenging issue with your JavaScript code. Blank pages after reloading child/openers can be frustrating. Double-check your code for any potential errors, especially related to handling page states or data loading

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