Reloads the current page, possibly forcing retrieval from the server even if the browser cache contains the latest version of the document. @param force if true, force reload from server; otherwise, may reload from cache @throws IOException if there is a problem reloading the page @see <a hr
(final boolean force)
| 240 | * @see <a href="http://msdn.microsoft.com/en-us/library/ms536342.aspx">MSDN Documentation</a> |
| 241 | */ |
| 242 | public void reload(final boolean force) throws IOException { |
| 243 | final WebWindow webWindow = window_.getWebWindow(); |
| 244 | final HtmlPage htmlPage = (HtmlPage) webWindow.getEnclosedPage(); |
| 245 | final WebRequest request = htmlPage.getWebResponse().getWebRequest(); |
| 246 | |
| 247 | // update request url with location.href in case hash was changed |
| 248 | request.setUrl(new URL(getHref())); |
| 249 | if (getBrowserVersion().hasFeature(JS_LOCATION_RELOAD_REFERRER)) { |
| 250 | request.setRefererHeader(htmlPage.getUrl()); |
| 251 | } |
| 252 | |
| 253 | webWindow.getWebClient().download(webWindow, "", request, false, null, "JS location.reload"); |
| 254 | } |
| 255 | |
| 256 | /** |
| 257 | * Reloads the window using the specified URL via a postponed action. |
nothing calls this directly
no test coverage detected