referrerpolicy
The referrerpolicy attribute indicates which referrer information to send when fetching resources or navigating using an SVG <a> element's link. You can use this attribute with the following SVG elements:
The **`referrerpolicy`** attribute indicates which referrer information to send when fetching resources or navigating using an SVG `<a>` element's link. You can use this attribute with the following SVG elements:
- a
## Example
```html
<svg viewBox="0 0 150 20" xmlns="http://www.w3.org/2000/svg">
<a href="https://example.com" referrerpolicy="origin">
<text x="5" y="15">Website</text>
</a>
</svg>
```
300
## Usage notes
<table class="properties">
<tbody>
<tr>
<th scope="row">Value</th>
<td>
<code>no-referrer</code> | <code>no-referrer-when-downgrade</code> |
<code>origin</code> | <code>origin-when-cross-origin</code> |
<code>same-origin</code> | <code>strict-origin</code> |
<code>strict-origin-when-cross-origin</code> | <code>unsafe-url</code>
</td>
</tr>
<tr>
<th scope="row">Default value</th>
<td><code>strict-origin-when-cross-origin</code></td>
</tr>
<tr>
<th scope="row">Animatable</th>
<td>No</td>
</tr>
</tbody>
</table>
- `no-referrer`
- : The Referer header will not be sent.
- `no-referrer-when-downgrade`
- : Sends the full URL (origin, path, and query string) when the protocol security level is the same or better (HTTP→HTTP, HTTP→HTTPS, HTTPS→HTTPS), but sends no header to a less secure destination (HTTPS→HTTP).
- `origin`
- : The Referer header will only send the origin of the URL. For example, a document at `https://example.com/page.html` will send `https://example.com/` as the referrer.
- `origin-when-cross-origin`
- : Sends the full URL when performing a same-origin request, but only sends the origin for cross-origin requests, and sends no header to a less secure destination (HTTPS→HTTP).
- `same-origin`
- : Only sends the full URL to a same-origin request, but sends no header for cross-origin requests.
- `strict-origin`
- : Sends only the origin when the protocol security level stays the same, but sends no header to a less secure destination.
- `strict-origin-when-cross-origin`
- : Default value. Sends the full URL when performing a same-origin request, but only sends the origin for cross-origin requests, and sends no Referer header to a less secure destination.
- `unsafe-url`
- : Sends the full URL when performing any task regardless of security.
> [!WARNING]
> This policy will potentially leak private information when navigating from HTTPS to HTTP.
## Specifications
## Browser compatibility
## See also
- href
- Referrer-Policy header
- SVGAElement.referrerPolicy
Cite this
"referrerpolicy". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Attribute/referrerpolicy JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy