News for hackers. Stuff that matters.
Re:A new method to validate URLs in JavaScript (2023 edition) by handy2000 on Saturday December 02, 2023 @09:53PM (#38504362)
There is a distinction to be made between a parseable string and a valid URL in more complete terms. While it's nice to have a new standard function that checks whether a string is parseable as a URL, it can't, of course, validate that string in terms of whether the TLD is a real one, and not something like "https://super.hacker/".

So maybe the post should have called it what it is: validating parse-ability, since the method itself is called "canParse()".

Re:A new method to validate URLs in JavaScript (2023 edition) by hducy4 on Saturday December 02, 2023 @10:17PM (#38504500)
super.hacker is a valid url.

Url validity isn't dictated by ICANN.