When absolute URL is used on AJAX link, there is new URL() used, which is not supported in IE11.
More over, when the URL is parsed, the regular expression below doesn't make any sense (or does it?):
There is pathname property used in string, which never should contain port number, so checking the port number is unnecessary. Port number would be in host (or even better in port).
The URL object always contains leading / in pathname, even though the pathname might be missing in link. So even URL eg. "http://www.example.com#foo" will return pathname equal to /. Therefore, parsedUrl['pathname'] + parsedUrl['search'] + parsedUrl['hash'] may never begin with #, but always with /.
So in my opinion, the correct condition should be if pathname from current location is the same as in parsedUrl, search is the same and hash is specified in parsedUrl. If so, return false, otherwise return true. Is that correct or am I missing something?
When absolute URL is used on AJAX link, there is
new URL()
used, which is not supported in IE11.More over, when the URL is parsed, the regular expression below doesn't make any sense (or does it?):
pathname
property used in string, which never should contain port number, so checking the port number is unnecessary. Port number would be inhost
(or even better inport
)./
inpathname
, even though thepathname
might be missing in link. So even URL eg. "http://www.example.com#foo" will returnpathname
equal to/
. Therefore,parsedUrl['pathname'] + parsedUrl['search'] + parsedUrl['hash']
may never begin with#
, but always with/
.So in my opinion, the correct condition should be if
pathname
from currentlocation
is the same as inparsedUrl
,search
is the same and hash is specified inparsedUrl
. If so, return false, otherwise return true. Is that correct or am I missing something?