Probably the easiest is something like this
In your modal
window.returnValue = "doReload";
window.close();
Then in your mainpage
var modal = window.showModal....
if (modal == "doReload") {
window.location = window.location;
}
What I like about this approach is that you can return all sorts of values and perform different actions.