0

When I'm trying to use native URL API for validation purposes, surprisingly, Edge browser behaves differently. So the input of:

const myUrlString = "abfss://myprojectname/filename.csv";
const myUrl = new URL(myUrlString);
console.log(myUrl);

Note: abfss:// is Microsoft's Azure file storage protocol.

Chrome returns:

{
  "hash": "",
  "host": "myprojectname",
  "hostname": "myprojectname",
  "href": "abfss://myprojectname/filename.csv",
  "origin": "null",
  "password": "",
  "pathname": "/filename.csv",
  "port": "",
  "protocol": "abfss:",
  "search": "",
  "username: "",
  ...
}

Edge returns:

{
    "hash": "",
    "host": "",
    "hostname": "",
    "href": "abfss://myprojectname/filename.csv",
    "origin": "null",
    "password": "",
    "pathname": "//myprojectname/filename.csv",
    "port": "",
    "protocol": "abfss:",
    "search": "",
    "username": "",
    ...
}

Notice host and hostname being empty strings. For some reason, it doesn't parse any URLs with non-http(s) protocol. Does anyone know how to solve this to have uniform behavior across browsers?

2 Answers 2

0

I can reproduce this issue on Edge Stable and Edge Beta, but it works fine on Edge Dev and Edge Canary.

Anyway, it looks like a regression issue, and I suggest you report this problem to the Edge Dev Team by sending feedback. You can send feedback in Microsoft Edge at ··· menu --> Help and feedback --> Send feedback.

And the workaround is to use Dev and Canary for the time being.

Sign up to request clarification or add additional context in comments.

1 Comment

For the record, my version is 131.0.2903.86 (Official build) (x86_64)
0

const myUrlString = "abfss://myprojectname/filename.csv";
const myUrl = new URL(myUrlString);
console.log(myUrl);

{
  "hash": "",
  "host": "myprojectname",
  "hostname": "myprojectname",
  "href": "abfss://myprojectname/filename.csv",
  "origin": "null",
  "password": "",
  "pathname": "/filename.csv",
  "port": "",
  "protocol": "abfss:",
  "search": "",
  "username: "",
  ...
}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.