not a valid URL
Convert a file:/// url to an absolute remote URL. Rendering pages locally sometimes adds a spurious 'file:///' to the beginning of relative resource paths. This function strips the 'file:///' and constructs an absolute url.
Parameters:
path must be a String.
(resource path to clean)
pageUrl must be a String.
(URL of the page the resource was linked from)
already absolute
root relative path
Get the base URL from a URL
Parameters:
Returns a String
(the base URL)
naked domain - return unchanged
Get the root URL from a URL
Parameters:
Returns a String
(the root URL)
Convert a relative URL to an absolute
Parameters:
relative must be a String.
(the relative URL to convert)
current must be a String.
(the URL to which relative
is relative)
Returns a String
(the converted URL)
Resolve HTTP redirects
Check a URL meets basic validity requirements. Return true if the URL is of the form: http://domain.tld[/other/parts] OR https://... ftp://... Otherwise, raise an Error.
Parameters:
(the URL to validate)