I have an iframe in a page. When the iframe is closed I would like to refresh the parent page. Checking out the iframe element w3 page I see there are no standard events.
I considered a polling approach, having the parent page constantly check if the frame is created, and then checking if it is removed and then refreshing, however this approach isn't great. I can imagine sometimes delays between iframe close and page reload if the polling is to infrequent. With a more frequent polling the page would impact "user experience" (jerkiness).
I'm wondering if there is another approach that does not involve iframe parent communications.
I don't see why you won't use parent-iframe communication. Since everything happens in the page within iframe, and you just need to let the parent page know about this after this happens, the best way is to call a function in parent page so that you can partially refresh the parent page without having to reload the iframe itself. This way:
You can learn the technique step by step in How to refresh parent page partially from page within iframe.
Hope this helps.