• Skip to main content
  • Skip to search
  • Skip to select language
webdocs.dev
  • References
    • Overview / Web Technology

      Web technology reference for developers

    • HTML

      Structure of content on the web

    • CSS

      Code used to describe document style

    • JavaScript

      General-purpose scripting language

    • HTTP

      Protocol for transmitting web resources

    • Web APIs

      Interfaces for building web applications

    • Web Extensions

      Developing extensions for web browsers

    • Web Technology

      Web technology reference for developers

  • Guides
    • Overview / MDN Learning Area

      Learn web development

    • MDN Learning Area

      Learn web development

    • HTML

      Learn to structure web content with HTML

    • CSS

      Learn to style content using CSS

    • JavaScript

      Learn to run scripts in the browser

    • Accessibility

      Learn to make the web accessible to all

  • Play New
  1. References
  2. Web APIs
  3. WebSocket
  4. url

In this article

  • Value
  • Specifications
  • Browser compatibility
  1. WebSocket
  2. Constructor
    1. WebSocket()
  3. Instance properties
    1. binaryType
    2. bufferedAmount
    3. extensions
    4. protocol
    5. readyState
    6. url
  4. Instance methods
    1. close()
    2. send()
  5. Events
    1. close
    2. error
    3. message
    4. open
  6. Inheritance:
    1. EventTarget

In this article

  • Value
  • Specifications
  • Browser compatibility

WebSocket: url property

The WebSocket.url read-only property returns the absolute URL of the WebSocket as resolved by the constructor.

Value

A string.

Specifications

Specification
WebSockets Standard
# ref-for-dom-websocket-url①

Browser compatibility

Found a content problem with this page?

  • Edit the page on GitHub.
  • Report the content issue.
  • View the source on GitHub.
Want to get more involved? Learn how to contribute.

This page was last modified on Apr 8, 2023 by MDN contributors.

webdocs.dev
  • GitHub

Support

  • Report an issue

Our communities

  • Discord

Developers

  • Web Technologies
  • Learn Web Development

Portions of this content are ©1998–2025 by individual contributors. Content available under a Creative Commons license.