UIWebView utilities inspired by PhantomJS