IMG.protocol (Property)

The protocol that was used in the image URL.

Availability:

JScript - 3.0
Internet Explorer - 4.0
Property/method value type:String primitive
JavaScript syntax:IEmyIMG.protocol

This should yield the value HTTP or FILE or one of the other available protocols according to how the image was accessed. This allows you to build script code than can behave differently according to how the image was loaded.

Typically this might allow for a different page content to be displayed when an image is loaded from a local file system.

Refer to the URL topic for details of a variety of URL protocol values.

See also:Anchor.protocol, Document.protocol, URL, Url.protocol

Property attributes:

ReadOnly