How to make wpe-webkit-mir-kiosk wait for local server before loading page

Is there any way to make wpe-webkit-mir-kiosk waiting for the local web server coming up before loading the page? Basically, I want to avoid the behavior of displaying the “Unable to connect” with the “Try Again” button for refreshing the page.