A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/html/html-script-referrerpolicy-attribute/ below:

HTML <script> referrerpolicy Attribute - GeeksforGeeks

HTML <script> referrerpolicy Attribute

Last Updated : 28 Jul, 2022

The HTML <script> referrerpolicy Attribute is used to specify the reference information that will be sent to the server when fetching the script. 

Syntax:

<script referrerpolicy="no-referrer|no-referrer-when-downgrade|
        origin|origin-when-cross-origin|same-origin|
        strict-origin-when-cross-origin|unsafe-url">

Attribute Values: 

Example: Below code illustrates the use of referrerpolicy attribute in <script> element. 

HTML
<!DOCTYPE html>
<html>

<head>
    <title>HTML script referrerpolicy Attribute</title>
</head>

<body style="text-align: center">
    <h1>GeeksForGeeks</h1>

    <h2>HTML script referrerpolicy Attribute</h2>

    <br />
    <button>Submit</button>

    <script id="myGeeks" type="text/javascript" 
        src="my_script.js" referrerpolicy="no-referrer">
    </script>
</body>

</html>

 Output: 

Supported Browsers: 



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4