• Skip to main content
  • Skip to search
    • Technologies Overview
    • HTML
    • CSS
    • JavaScript
    • Graphics
    • HTTP
    • APIs
    • Browser Extensions
    • MathML
    • Learn web development
    • Tutorials
    • References
    • Developer Guides
    • Accessibility
    • Game development
    • ...more docs
    • Send Feedback
    • Contribute to MDN
    • Report a content issue 🌐
    • Report a platform issue 🌐
  1. Web technology for developers
  2. Web APIs
  3. WebSocket
  4. WebSocket.url
  • Change language

Table of contents

  • Syntax
  • Value
  • Specifications
  • Browser compatibility

WebSocket.url

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

Syntax

var url = aWebSocket.url;

Value

A DOMString.

Specifications

Specification Status Comment
HTML Living Standard
The definition of 'WebSocket: url' in that specification.
Living Standard Initial definition

Browser compatibility

BCD tables only load in the browser

Found a problem with this page?

  • Source on GitHub
  • Report a problem with this content on GitHub
  • Want to fix the problem yourself? See our Contribution guide.

Last modified: Feb 19, 2021, by MDN contributors

Change your language

Related Topics

  1. WebSocket
  2. Constructor
    1. WebSocket()
  3. Properties
    1. binaryType
    2. bufferedAmount
    3. extensions
    4. onclose
    5. onerror
    6. onmessage
    7. onopen
    8. protocol
    9. readyState
    10. url
  4. Methods
    1. close()
    2. send()
  5. Events
    1. close
    2. error
    3. message
    4. open
  6. Inheritance:
    1. EventTarget
  • Web Technologies
  • Learn Web Development
  • About MDN
  • Feedback
  • About
  • MDN Web Docs Store
  • Contact Us
  • Firefox

MDN

Mozilla

© 2005-2021 Mozilla and individual contributors. Content is available under these licenses.

  • Terms
  • Privacy
  • Cookies