Note: EdgeHTML Mode does not provide the protocol attribute for the HTMLImageElement interface.

protocol of type DOMString

Sets or retrieves the protocol portion of a URL.

The protocol property specifies how to transfer information from the host to the client.

The document, img, and location objects expose the protocol property as read-only. The location.protocol property returns the initial substring of a URL, including the first colon (for example, http:). However, the document.protocol property returns the expanded text of the protocol acronym. For example, it returns the http protocol as Hypertext Transfer Protocol.

This is a DOM attribute only.

The protocol attribute extends the following interfaces:

All Document Modes (All Versions)