menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Programming News

>

Dealing wi...
source image

Dev

3d

read

242

img
dot

Image Credit: Dev

Dealing with relative paths in JavaScript URL parsing

  • JavaScript URL parsing usually requires full URIs with schema, but dealing with relative paths can be tricky.
  • Using the thismessage:/ schema allows for parsing relative paths without needing to fake a domain.
  • The thismessage:/ schema is recognized by the URL constructor and can be added to relative paths for accurate parsing.
  • This approach follows official internet rules and provides a standards-compliant method for handling relative paths in URL operations.

Read Full Article

like

14 Likes

For uninterrupted reading, download the app