# WebViewClientCompat

Artifact: [androidx.webkit:webkit](https://developer.android.com/jetpack/androidx/releases/webkit) [View Source](https://cs.android.com/search?q=file:androidx/webkit/WebViewClientCompat.java+class:androidx.webkit.WebViewClientCompat) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/webkit#1.1.0)

*** ** * ** ***


```
public class WebViewClientCompat extends WebViewClient
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [android.webkit.WebViewClient](https://developer.android.com/reference/android/webkit/WebViewClient.html) ||
|   | ↳ | [androidx.webkit.WebViewClientCompat](https://developer.android.com/reference/androidx/webkit/WebViewClientCompat) |

*** ** * ** ***

Compatibility version of `https://developer.android.com/reference/android/webkit/WebViewClient.html`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/webkit/WebViewClientCompat#WebViewClientCompat()()` |

| ### Public methods |
|---|---|
| `void` | `@https://developer.android.com/reference/androidx/annotation/UiThread https://developer.android.com/reference/androidx/webkit/WebViewClientCompat#onPageCommitVisible(android.webkit.WebView,java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/webkit/WebView.html view, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html url)` Notify the host application that `https://developer.android.com/reference/android/webkit/WebView.html` content left over from previous page navigations will no longer be drawn. |
| `final void` | `https://developer.android.com/reference/androidx/webkit/WebViewClientCompat#onReceivedError(android.webkit.WebView,android.webkit.WebResourceRequest,android.webkit.WebResourceError)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/webkit/WebView.html view, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/webkit/WebResourceRequest.html request, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/webkit/WebResourceError.html error )` Applications are not meant to override this, and should instead override the non-final `https://developer.android.com/reference/androidx/webkit/WebViewClientCompat#onReceivedError(android.webkit.WebView,android.webkit.WebResourceRequest,androidx.webkit.WebResourceErrorCompat)` method. |
| `void` | `@https://developer.android.com/reference/androidx/annotation/UiThread https://developer.android.com/reference/androidx/webkit/WebViewClientCompat#onReceivedError(android.webkit.WebView,android.webkit.WebResourceRequest,androidx.webkit.WebResourceErrorCompat)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/webkit/WebView.html view, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/webkit/WebResourceRequest.html request, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/webkit/WebResourceErrorCompat error )` Report web resource loading error to the host application. |
| `void` | `@https://developer.android.com/reference/androidx/annotation/UiThread https://developer.android.com/reference/androidx/webkit/WebViewClientCompat#onReceivedHttpError(android.webkit.WebView,android.webkit.WebResourceRequest,android.webkit.WebResourceResponse)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/webkit/WebView.html view, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/webkit/WebResourceRequest.html request, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/webkit/WebResourceResponse.html errorResponse )` Notify the host application that an HTTP error has been received from the server while loading a resource. |
| `void` | `@https://developer.android.com/reference/androidx/annotation/UiThread https://developer.android.com/reference/androidx/webkit/WebViewClientCompat#onSafeBrowsingHit(android.webkit.WebView,android.webkit.WebResourceRequest,int,androidx.webkit.SafeBrowsingResponseCompat)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/webkit/WebView.html view, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/webkit/WebResourceRequest.html request, int threatType, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/webkit/SafeBrowsingResponseCompat callback )` Notify the host application that a loading URL has been flagged by Safe Browsing. |
| `final void` | `@https://developer.android.com/reference/androidx/annotation/RequiresApi(value = https://developer.android.com/reference/android/os/Build.VERSION_CODES.html#O_MR1) https://developer.android.com/reference/androidx/webkit/WebViewClientCompat#onSafeBrowsingHit(android.webkit.WebView,android.webkit.WebResourceRequest,int,android.webkit.SafeBrowsingResponse)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/webkit/WebView.html view, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/webkit/WebResourceRequest.html request, int threatType, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/webkit/SafeBrowsingResponse.html response )` Applications are not meant to override this, and should instead override the non-final `https://developer.android.com/reference/androidx/webkit/WebViewClientCompat#onSafeBrowsingHit(android.webkit.WebView,android.webkit.WebResourceRequest,int,androidx.webkit.SafeBrowsingResponseCompat)` method. |
| `boolean` | `@https://developer.android.com/reference/androidx/annotation/UiThread https://developer.android.com/reference/androidx/webkit/WebViewClientCompat#shouldOverrideUrlLoading(android.webkit.WebView,android.webkit.WebResourceRequest)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/webkit/WebView.html view, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/webkit/WebResourceRequest.html request )` Give the host application a chance to take over the control when a new url is about to be loaded in the current WebView. |

### Inherited Constants

From [android.webkit.WebViewClient](https://developer.android.com/reference/android/webkit/WebViewClient.html) `static final int` `https://developer.android.com/reference/android/webkit/WebViewClient.html#ERROR_AUTHENTICATION = -4` `static final int` `https://developer.android.com/reference/android/webkit/WebViewClient.html#ERROR_BAD_URL = -12` `static final int` `https://developer.android.com/reference/android/webkit/WebViewClient.html#ERROR_CONNECT = -6` `static final int` `https://developer.android.com/reference/android/webkit/WebViewClient.html#ERROR_FAILED_SSL_HANDSHAKE = -11` `static final int` `https://developer.android.com/reference/android/webkit/WebViewClient.html#ERROR_FILE = -13` `static final int` `https://developer.android.com/reference/android/webkit/WebViewClient.html#ERROR_FILE_NOT_FOUND = -14` `static final int` `https://developer.android.com/reference/android/webkit/WebViewClient.html#ERROR_HOST_LOOKUP = -2` `static final int` `https://developer.android.com/reference/android/webkit/WebViewClient.html#ERROR_IO = -7` `static final int` `https://developer.android.com/reference/android/webkit/WebViewClient.html#ERROR_PROXY_AUTHENTICATION = -5` `static final int` `https://developer.android.com/reference/android/webkit/WebViewClient.html#ERROR_REDIRECT_LOOP = -9` `static final int` `https://developer.android.com/reference/android/webkit/WebViewClient.html#ERROR_TIMEOUT = -8` `static final int` `https://developer.android.com/reference/android/webkit/WebViewClient.html#ERROR_TOO_MANY_REQUESTS = -15` `static final int` `https://developer.android.com/reference/android/webkit/WebViewClient.html#ERROR_UNKNOWN = -1` `static final int` `https://developer.android.com/reference/android/webkit/WebViewClient.html#ERROR_UNSAFE_RESOURCE = -16` `static final int` `https://developer.android.com/reference/android/webkit/WebViewClient.html#ERROR_UNSUPPORTED_AUTH_SCHEME = -3` `static final int` `https://developer.android.com/reference/android/webkit/WebViewClient.html#ERROR_UNSUPPORTED_SCHEME = -10` `static final int` `https://developer.android.com/reference/android/webkit/WebViewClient.html#SAFE_BROWSING_THREAT_BILLING = 4` `static final int` `https://developer.android.com/reference/android/webkit/WebViewClient.html#SAFE_BROWSING_THREAT_MALWARE = 1` `static final int` `https://developer.android.com/reference/android/webkit/WebViewClient.html#SAFE_BROWSING_THREAT_PHISHING = 2` `static final int` `https://developer.android.com/reference/android/webkit/WebViewClient.html#SAFE_BROWSING_THREAT_UNKNOWN = 0` `static final int` `https://developer.android.com/reference/android/webkit/WebViewClient.html#SAFE_BROWSING_THREAT_UNWANTED_SOFTWARE = 3`

### Inherited methods

From [android.webkit.WebViewClient](https://developer.android.com/reference/android/webkit/WebViewClient.html) `void` `https://developer.android.com/reference/android/webkit/WebViewClient.html#doUpdateVisitedHistory(android.webkit.WebView, java.lang.String, boolean)(https://developer.android.com/reference/android/webkit/WebView.html view, https://developer.android.com/reference/java/lang/String.html url, boolean isReload)` `void` `https://developer.android.com/reference/android/webkit/WebViewClient.html#onFormResubmission(android.webkit.WebView, android.os.Message, android.os.Message)(https://developer.android.com/reference/android/webkit/WebView.html view, https://developer.android.com/reference/android/os/Message.html dontResend, https://developer.android.com/reference/android/os/Message.html resend)` `void` `https://developer.android.com/reference/android/webkit/WebViewClient.html#onLoadResource(android.webkit.WebView, java.lang.String)(https://developer.android.com/reference/android/webkit/WebView.html view, https://developer.android.com/reference/java/lang/String.html url)` `void` `https://developer.android.com/reference/android/webkit/WebViewClient.html#onPageFinished(android.webkit.WebView, java.lang.String)(https://developer.android.com/reference/android/webkit/WebView.html view, https://developer.android.com/reference/java/lang/String.html url)` `void` `https://developer.android.com/reference/android/webkit/WebViewClient.html#onPageStarted(android.webkit.WebView, java.lang.String, android.graphics.Bitmap)(https://developer.android.com/reference/android/webkit/WebView.html view, https://developer.android.com/reference/java/lang/String.html url, https://developer.android.com/reference/android/graphics/Bitmap.html favicon)` `void` `https://developer.android.com/reference/android/webkit/WebViewClient.html#onReceivedClientCertRequest(android.webkit.WebView, android.webkit.ClientCertRequest)(https://developer.android.com/reference/android/webkit/WebView.html view, https://developer.android.com/reference/android/webkit/ClientCertRequest.html request)` `void` `https://developer.android.com/reference/android/webkit/WebViewClient.html#onReceivedHttpAuthRequest(android.webkit.WebView, android.webkit.HttpAuthHandler, java.lang.String, java.lang.String)(
https://developer.android.com/reference/android/webkit/WebView.html view,
https://developer.android.com/reference/android/webkit/HttpAuthHandler.html handler,
https://developer.android.com/reference/java/lang/String.html host,
https://developer.android.com/reference/java/lang/String.html realm
)` `void` `https://developer.android.com/reference/android/webkit/WebViewClient.html#onReceivedLoginRequest(android.webkit.WebView, java.lang.String, java.lang.String, java.lang.String)(
https://developer.android.com/reference/android/webkit/WebView.html view,
https://developer.android.com/reference/java/lang/String.html realm,
https://developer.android.com/reference/java/lang/String.html account,
https://developer.android.com/reference/java/lang/String.html args
)` `void` `https://developer.android.com/reference/android/webkit/WebViewClient.html#onReceivedSslError(android.webkit.WebView, android.webkit.SslErrorHandler, android.net.http.SslError)(
https://developer.android.com/reference/android/webkit/WebView.html view,
https://developer.android.com/reference/android/webkit/SslErrorHandler.html handler,
https://developer.android.com/reference/android/net/http/SslError.html error
)` `boolean` `https://developer.android.com/reference/android/webkit/WebViewClient.html#onRenderProcessGone(android.webkit.WebView, android.webkit.RenderProcessGoneDetail)(https://developer.android.com/reference/android/webkit/WebView.html view, https://developer.android.com/reference/android/webkit/RenderProcessGoneDetail.html detail)` `void` `https://developer.android.com/reference/android/webkit/WebViewClient.html#onScaleChanged(android.webkit.WebView, float, float)(https://developer.android.com/reference/android/webkit/WebView.html view, float oldScale, float newScale)` `void` `https://developer.android.com/reference/android/webkit/WebViewClient.html#onTooManyRedirects(android.webkit.WebView, android.os.Message, android.os.Message)(https://developer.android.com/reference/android/webkit/WebView.html view, https://developer.android.com/reference/android/os/Message.html cancelMsg, https://developer.android.com/reference/android/os/Message.html continueMsg)`

**This method is deprecated.**
`void` `https://developer.android.com/reference/android/webkit/WebViewClient.html#onUnhandledKeyEvent(android.webkit.WebView, android.view.KeyEvent)(https://developer.android.com/reference/android/webkit/WebView.html view, https://developer.android.com/reference/android/view/KeyEvent.html event)` `https://developer.android.com/reference/android/webkit/WebResourceResponse.html` `https://developer.android.com/reference/android/webkit/WebViewClient.html#shouldInterceptRequest(android.webkit.WebView, android.webkit.WebResourceRequest)(https://developer.android.com/reference/android/webkit/WebView.html view, https://developer.android.com/reference/android/webkit/WebResourceRequest.html request)` `boolean` `https://developer.android.com/reference/android/webkit/WebViewClient.html#shouldOverrideKeyEvent(android.webkit.WebView, android.view.KeyEvent)(https://developer.android.com/reference/android/webkit/WebView.html view, https://developer.android.com/reference/android/view/KeyEvent.html event)`

## Public constructors

### WebViewClientCompat

Added in 1.1.0

```
public WebViewClientCompat()
```

## Public methods

### onPageCommitVisible

```
@UiThread
public void onPageCommitVisible(@NonNull WebView view, @NonNull String url)
```

Notify the host application that `https://developer.android.com/reference/android/webkit/WebView.html` content left over from previous page navigations will no longer be drawn.

This callback can be used to determine the point at which it is safe to make a recycled `https://developer.android.com/reference/android/webkit/WebView.html` visible, ensuring that no stale content is shown. It is called at the earliest point at which it can be guaranteed that `https://developer.android.com/reference/android/webkit/WebView.html#onDraw(android.graphics.Canvas)` will no longer draw any content from previous navigations. The next draw will display either the `https://developer.android.com/reference/android/webkit/WebView.html#setBackgroundColor(int)` of the `https://developer.android.com/reference/android/webkit/WebView.html`, or some of the contents of the newly loaded page.

This method is called when the body of the HTTP response has started loading, is reflected in the DOM, and will be visible in subsequent draws. This callback occurs early in the document loading process, and as such you should expect that linked resources (for example, CSS and images) may not be available.

For more fine-grained notification of visual state updates, see `https://developer.android.com/reference/androidx/webkit/WebViewCompat#postVisualStateCallback(android.webkit.WebView,long,androidx.webkit.WebViewCompat.VisualStateCallback)`.

Please note that all the conditions and recommendations applicable to `https://developer.android.com/reference/androidx/webkit/WebViewCompat#postVisualStateCallback(android.webkit.WebView,long,androidx.webkit.WebViewCompat.VisualStateCallback)` also apply to this API.

This callback is only called for main frame navigations.

This method is called only if `https://developer.android.com/reference/androidx/webkit/WebViewFeature#VISUAL_STATE_CALLBACK()` is supported. You can check whether that flag is supported using `https://developer.android.com/reference/androidx/webkit/WebViewFeature#isFeatureSupported(java.lang.String)`.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/webkit/WebView.html view` | The `https://developer.android.com/reference/android/webkit/WebView.html` for which the navigation occurred. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html url` | The URL corresponding to the page navigation that triggered this callback. |

### onReceivedError

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/webkit#1.1.0)

```
public final void onReceivedError(
    @NonNull WebView view,
    @NonNull WebResourceRequest request,
    @NonNull WebResourceError error
)
```

Applications are not meant to override this, and should instead override the non-final `https://developer.android.com/reference/androidx/webkit/WebViewClientCompat#onReceivedError(android.webkit.WebView,android.webkit.WebResourceRequest,androidx.webkit.WebResourceErrorCompat)` method.

### onReceivedError

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/webkit#1.1.0)

```
@UiThread
public void onReceivedError(
    @NonNull WebView view,
    @NonNull WebResourceRequest request,
    @NonNull WebResourceErrorCompat error
)
```

Report web resource loading error to the host application. These errors usually indicate inability to connect to the server. Note that unlike the deprecated version of the callback, the new version will be called for any resource (iframe, image, etc.), not just for the main page. Thus, it is recommended to perform minimum required work in this callback.

This method is called only if `https://developer.android.com/reference/androidx/webkit/WebViewFeature#RECEIVE_WEB_RESOURCE_ERROR()` is supported. You can check whether that flag is supported using `https://developer.android.com/reference/androidx/webkit/WebViewFeature#isFeatureSupported(java.lang.String)`.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/webkit/WebView.html view` | The WebView that is initiating the callback. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/webkit/WebResourceRequest.html request` | The originating request. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/webkit/WebResourceErrorCompat error` | Information about the error occurred. |

### onReceivedHttpError

```
@UiThread
public void onReceivedHttpError(
    @NonNull WebView view,
    @NonNull WebResourceRequest request,
    @NonNull WebResourceResponse errorResponse
)
```

Notify the host application that an HTTP error has been received from the server while loading a resource. HTTP errors have status codes \>= 400. This callback will be called for any resource (iframe, image, etc.), not just for the main page. Thus, it is recommended to perform minimum required work in this callback. Note that the content of the server response may not be provided within the `errorResponse` parameter.

This method is called only if `https://developer.android.com/reference/androidx/webkit/WebViewFeature#RECEIVE_HTTP_ERROR()` is supported. You can check whether that flag is supported using `https://developer.android.com/reference/androidx/webkit/WebViewFeature#isFeatureSupported(java.lang.String)`.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/webkit/WebView.html view` | The WebView that is initiating the callback. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/webkit/WebResourceRequest.html request` | The originating request. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/webkit/WebResourceResponse.html errorResponse` | Information about the error occurred. |

### onSafeBrowsingHit

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/webkit#1.1.0)

```
@UiThread
public void onSafeBrowsingHit(
    @NonNull WebView view,
    @NonNull WebResourceRequest request,
    int threatType,
    @NonNull SafeBrowsingResponseCompat callback
)
```

Notify the host application that a loading URL has been flagged by Safe Browsing.

The application must invoke the callback to indicate the preferred response. The default behavior is to show an interstitial to the user, with the reporting checkbox visible.

If the application needs to show its own custom interstitial UI, the callback can be invoked asynchronously with `https://developer.android.com/reference/androidx/webkit/SafeBrowsingResponseCompat#backToSafety(boolean)` or `https://developer.android.com/reference/androidx/webkit/SafeBrowsingResponseCompat#proceed(boolean)`, depending on user response.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/webkit/WebView.html view` | The WebView that hit the malicious resource. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/webkit/WebResourceRequest.html request` | Object containing the details of the request. |
| `int threatType` | The reason the resource was caught by Safe Browsing, corresponding to a `SAFE_BROWSING_THREAT_*` value. Value is one of the following: - `WebViewClient.SAFE_BROWSING_THREAT_UNKNOWN` - `WebViewClient.SAFE_BROWSING_THREAT_MALWARE` - `WebViewClient.SAFE_BROWSING_THREAT_PHISHING` - `WebViewClient.SAFE_BROWSING_THREAT_UNWANTED_SOFTWARE` - `WebViewClient.SAFE_BROWSING_THREAT_BILLING` <br /> |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/webkit/SafeBrowsingResponseCompat callback` | Applications must invoke one of the callback methods. |

### onSafeBrowsingHit

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/webkit#1.1.0)

```
@RequiresApi(value = Build.VERSION_CODES.O_MR1)
public final void onSafeBrowsingHit(
    @NonNull WebView view,
    @NonNull WebResourceRequest request,
    int threatType,
    @NonNull SafeBrowsingResponse response
)
```

Applications are not meant to override this, and should instead override the non-final `https://developer.android.com/reference/androidx/webkit/WebViewClientCompat#onSafeBrowsingHit(android.webkit.WebView,android.webkit.WebResourceRequest,int,androidx.webkit.SafeBrowsingResponseCompat)` method.

### shouldOverrideUrlLoading

```
@UiThread
public boolean shouldOverrideUrlLoading(
    @NonNull WebView view,
    @NonNull WebResourceRequest request
)
```

Give the host application a chance to take over the control when a new url is about to be loaded in the current WebView. If WebViewClient is not provided, by default WebView will ask Activity Manager to choose the proper handler for the url. If WebViewClient is provided, return `true` means the host application handles the url, while return `false` means the current WebView handles the url.

Notes:

- This method is not called for requests using the POST "method".
- This method is also called for subframes with non-http schemes, thus it is strongly disadvised to unconditionally call `https://developer.android.com/reference/android/webkit/WebView.html#loadUrl(java.lang.String)` with the request's url from inside the method and then return `true`, as this will make WebView to attempt loading a non-http url, and thus fail.

This method is called only if `https://developer.android.com/reference/androidx/webkit/WebViewFeature#SHOULD_OVERRIDE_WITH_REDIRECTS()` is supported. You can check whether that flag is supported using `https://developer.android.com/reference/androidx/webkit/WebViewFeature#isFeatureSupported(java.lang.String)`.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/webkit/WebView.html view` | The WebView that is initiating the callback. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/webkit/WebResourceRequest.html request` | Object containing the details of the request. |

| Returns |
|---|---|
| `boolean` | `true` if the host application wants to leave the current WebView and handle the url itself, otherwise return `false`. |