HTMLIFrameElement.src

The HTMLIFrameElement.src property reflects the HTML referrerpolicy attribute of the <iframe> element defining which referrer is sent when fetching the resource.

Syntax

refStr = iframeElt.src;
iframeElt.src= refStr;

Example

var iframe = document.createElement("iframe");
iframe.src = "/";
var body = document.getElementsByTagName("body")[0];
body.appendChild(iframe); // Fetch the image using the complete URL as the referrer

Specifications

Specification
HTML Standard
# dom-iframe-src

Browser compatibility

BCD tables only load in the browser

See also