HTML <area> referrerpolicy Attribute
The HTML <area> referrerpolicy Attribute is used to specify the reference information on the client side that will be sent to the server when fetching out the result.
Syntax:
<area referrerpolicy="value">
Attribute Values:
- no-referrer: It specifies that no reference information will be sent along with a request.
- no-referrer-when-downgrade: It has a default value. It specifies that refer header will not be sent to origins without HTTPS.
- origin: It specifies to only send the origin of the document as the referrer in all cases.
- origin-when-cross-origin: It sends the origin, path, and query string when performing a same-origin request, but only send the origin of the document for other cases.
- same-origin: It specifies that the referrer will be sent for same-site origins, but cross-origin requests will send no referrer information.
- strict-origin-when-cross-origin: It sends the origin, path, and query string when performing a same-origin request, only send the origin when the protocol security level stays the same while performing a cross-origin request (HTTPS/HTTPS), and send no header to any less-secure destinations (HTTPS/HTTP).
- unsafe-url: It sends an origin, path and query string as a reference information but does not include password and username.
Example:
HTML
<!DOCTYPE html> < html > < body > < h2 > GeeksForGeeks </ h2 > < h2 > HTML area referrerpolicy Attribute </ h2 > < img src = alt = "" width = "300" height = "119" class = "aligncenter size-medium wp-image-910965" usemap = "#shapemap" /> < map name = "shapemap" > <!-- area tag contained image. --> < area shape = "poly" coords = "59,31,28,83,91,83" href = alt = "Triangle" referrerpolicy = "same-origin" > < area shape = "circle" coords = "155,56,26" href = alt = "Circle" referrerpolicy = "same-origin" > < area shape = "rect" coords = "224,30,276,82" href = alt = "Square" referrerpolicy = "same-origin" > </ map > </ body > </ html > |
Output:
Supported Browsers:
- Google Chrome 51.0 and above
- Internet Explorer Not Supported
- Mozilla Firefox 50.0 and above
- Opera 38.0 and above
- Safari 11.1 and above
- Edge 79.0 and above
Please Login to comment...