How to remove 'http://' from a URL in JavaScript [duplicate]
I think it would be better to take into account all possible protocols.
result = url.replace(/(^\w+:|^)\/\//, '');
I think it would be better to take into account all possible protocols.
result = url.replace(/(^\w+:|^)\/\//, '');