[JS] Extract Hostname From URL STRING
THIS SITE IS MIRROR || Skip to Full Contents (Read More)
[JS] Extract Hostname From URL STRING - Extract HostnameDomainfrom URL stringfunction extractHostnameurl var hostname; //find remove protocol http, ftp, etc. and Extract Hostname/Domain from URL (string)
function extractHostname(url) {
var hostname;
//find & remove protocol (http, ftp, etc.) and get hostname
if (url.indexOf(“//“) > -1) {
THIS SITE IS MIRROR || Skip to Full Contents (Read More)
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.