خصوصية المشارك في <script> الخاصية referrerpolicy HTML
التعريف والاستخدام
referrerpolicy
تحدد الخاصية ما هي معلومات المشارك التي يتم إرسالها أثناء الحصول على الجافا سكريبت.
مثال
تحديد referrerpolicy لجافا سكريبت:
<script src="myscripts.js" referrerpolicy="origin"></script>
القواعد النحوية
<script referrerpolicy="no-referrer|no-referrer-when-downgrade|origin|origin-when-cross-origin|same-origin|strict-origin-when-cross-origin|unsafe-url">
قيمة الخاصية
القيمة | الوصف |
---|---|
no-referrer | لا يتم إرسال معلومات المشارك. |
no-referrer-when-downgrade |
القيمة الافتراضية. إذا بقي مستوى الأمان للبروتوكول ثابتًا أو أعلى (من HTTP إلى HTTP، من HTTPS إلى HTTPS، من HTTP إلى HTTPS يمكن) إذا كان مستوى الأمان للبروتوكول منخفضًا (من HTTPS إلى HTTP غير صالح)، فلا يتم إرسال أي محتوى. |
origin | Send the document's source (protocol, host, and port). |
origin-when-cross-origin | For cross-origin requests, send the document's source. For same-origin requests, send the document's source, path, and query string. |
same-origin | For same-origin requests, send the referrer. For cross-origin requests, do not send the referrer. |
strict-origin-when-cross-origin |
If the security level of the protocol remains the same or higher (from HTTP to HTTP, from HTTPS to HTTPS, and from HTTP to HTTPS), send the source information. For lower security levels (from HTTPS to HTTP), do not send any content. |
unsafe-url | Send the source, path, and query string (regardless of security level). Use this value with caution! |
Browser support
The numbers in the table indicate the first browser version that fully supports this property.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
70.0 | 79.0 | 65.0 | Not supported | Support |