Is Absolute URL

Check if a URL is absolute (has protocol).

Code

Utilities
/^[a-z][a-z0-9+.-]*:\/\//i.test(url);

Parameters

URL to check.

Browser·fetch() may be limited by CORS

More JavaScript Snippets