Bug 1953851 - [devtools] Update the MDN links in devtools r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D241589
This commit is contained in:
@@ -352,7 +352,7 @@ inspectorSearchHTML.nextButton.title=Next result
|
||||
# shown in the inspector contextual-menu for the item that lets users copy
|
||||
# the URL embedding the image data encoded in Base 64 (what we name
|
||||
# here Image Data URL). For more information:
|
||||
# https://developer.mozilla.org/en-US/docs/Web/HTTP/data_URIs
|
||||
# https://developer.mozilla.org/en-US/docs/Web/URI/Reference/Schemes/data
|
||||
inspectorImageDataUri.label=Image Data-URL
|
||||
|
||||
# LOCALIZATION NOTE (inspectorShowDOMProperties.label): This is the label
|
||||
|
||||
@@ -608,7 +608,7 @@ netmonitor.toolbar.cookies=Cookies
|
||||
# LOCALIZATION NOTE (netmonitor.toolbar.setCookies): This is the label displayed
|
||||
# in the network table toolbar, above the "set cookies" column.
|
||||
# Set-Cookie is a HTTP response header. This string is the plural form of it.
|
||||
# See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie
|
||||
# See https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Set-Cookie
|
||||
netmonitor.toolbar.setCookies=Set-Cookies
|
||||
|
||||
# LOCALIZATION NOTE (netmonitor.toolbar.scheme): This is the label displayed
|
||||
|
||||
@@ -109,7 +109,7 @@ const SUPPORTED_HEADERS = [
|
||||
];
|
||||
|
||||
const MDN_URL = "https://developer.mozilla.org/docs/";
|
||||
const MDN_STATUS_CODES_LIST_URL = `${MDN_URL}Web/HTTP/Status`;
|
||||
const MDN_STATUS_CODES_LIST_URL = `${MDN_URL}Web/HTTP/Reference/Status`;
|
||||
const getGAParams = (panelId = "netmonitor") => {
|
||||
return `?utm_source=mozilla&utm_medium=devtools-${panelId}&utm_campaign=default`;
|
||||
};
|
||||
@@ -130,7 +130,7 @@ function getHeadersURL(header) {
|
||||
item => item.toLowerCase() === lowerCaseHeader
|
||||
);
|
||||
return idx > -1
|
||||
? `${MDN_URL}Web/HTTP/Headers/${SUPPORTED_HEADERS[idx] + getGAParams()}`
|
||||
? `${MDN_URL}Web/HTTP/Reference/Headers/${SUPPORTED_HEADERS[idx] + getGAParams()}`
|
||||
: null;
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ function getHeadersURL(header) {
|
||||
function getHTTPStatusCodeURL(statusCode, panelId) {
|
||||
return (
|
||||
(SUPPORTED_HTTP_CODES.includes(statusCode)
|
||||
? `${MDN_URL}Web/HTTP/Status/${statusCode}`
|
||||
? `${MDN_URL}Web/HTTP/Reference/Status/${statusCode}`
|
||||
: MDN_STATUS_CODES_LIST_URL) + getGAParams(panelId)
|
||||
);
|
||||
}
|
||||
@@ -214,7 +214,7 @@ function getCORSErrorURL(reason) {
|
||||
[1015, "CORSMissingAllowHeaderFromPreflight"],
|
||||
]);
|
||||
const urlFrag = reasonMap.get(reason) || "";
|
||||
return `${MDN_URL}Web/HTTP/CORS/Errors/${urlFrag}`;
|
||||
return `${MDN_URL}Web/HTTP/Guides/CORS/Errors/${urlFrag}`;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
||||
@@ -29,7 +29,7 @@ function run_test() {
|
||||
info("Checking for supported headers");
|
||||
equal(
|
||||
getHeadersURL("Accept"),
|
||||
`${MDN_URL}Web/HTTP/Headers/Accept${GTM_PARAMS_NM}`
|
||||
`${MDN_URL}Web/HTTP/Reference/Headers/Accept${GTM_PARAMS_NM}`
|
||||
);
|
||||
info("Checking for unsupported headers");
|
||||
equal(getHeadersURL("Width"), null);
|
||||
@@ -37,12 +37,12 @@ function run_test() {
|
||||
info("Checking for supported status code");
|
||||
equal(
|
||||
getHTTPStatusCodeURL("200", "webconsole"),
|
||||
`${MDN_URL}Web/HTTP/Status/200${GTM_PARAMS_WC}`
|
||||
`${MDN_URL}Web/HTTP/Reference/Status/200${GTM_PARAMS_WC}`
|
||||
);
|
||||
info("Checking for unsupported status code");
|
||||
equal(
|
||||
getHTTPStatusCodeURL("999", "webconsole"),
|
||||
`${MDN_URL}Web/HTTP/Status${GTM_PARAMS_WC}`
|
||||
`${MDN_URL}Web/HTTP/Reference/Status${GTM_PARAMS_WC}`
|
||||
);
|
||||
|
||||
equal(
|
||||
|
||||
@@ -32,7 +32,7 @@ window.onload = async function () {
|
||||
const notificationBox = TestUtils.renderIntoDocument(boxElement);
|
||||
const notificationNode = ReactDOM.findDOMNode(notificationBox);
|
||||
|
||||
const mdnLink = "https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors"
|
||||
const mdnLink = "https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS/Errors"
|
||||
|
||||
const mdnLinkButton = {mdnUrl: mdnLink, label: "learn more about error" }
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ requestLongerTimeout(2);
|
||||
const TEST_URI =
|
||||
"http://example.com/browser/devtools/client/webconsole/test/browser/test-network-request.html";
|
||||
const BASE_CORS_ERROR_URL =
|
||||
"https://developer.mozilla.org/docs/Web/HTTP/CORS/Errors/";
|
||||
"https://developer.mozilla.org/docs/Web/HTTP/Guides/CORS/Errors/";
|
||||
const BASE_CORS_ERROR_URL_PARAMS = new URLSearchParams({
|
||||
utm_source: "devtools",
|
||||
utm_medium: "firefox-cors-errors",
|
||||
|
||||
@@ -11,7 +11,7 @@ const SJS_URL =
|
||||
"https://example.com/browser/devtools/client/webconsole/" +
|
||||
"/test/browser/test_hsts-invalid-headers.sjs";
|
||||
const LEARN_MORE_URI =
|
||||
"https://developer.mozilla.org/docs/Web/HTTP/Headers/" +
|
||||
"https://developer.mozilla.org/docs/Web/HTTP/Reference/Headers/" +
|
||||
"Strict-Transport-Security" +
|
||||
DOCS_GA_PARAMS;
|
||||
|
||||
|
||||
@@ -14,7 +14,8 @@ const {
|
||||
l10n,
|
||||
} = require("resource://devtools/client/webconsole/utils/messages.js");
|
||||
const LEARN_MORE_URI =
|
||||
"https://developer.mozilla.org/docs/Web/HTTP/Status/200" + GA_PARAMS;
|
||||
"https://developer.mozilla.org/docs/Web/HTTP/Reference/Status/200" +
|
||||
GA_PARAMS;
|
||||
|
||||
pushPref(NET_PREF, true);
|
||||
pushPref(XHR_PREF, true);
|
||||
|
||||
@@ -36,10 +36,10 @@ add_task(async function testSameSiteCookieMessage() {
|
||||
{
|
||||
pref: false,
|
||||
message1:
|
||||
"Cookie “a” does not have a proper “SameSite” attribute value. Soon, cookies without the “SameSite” attribute or with an invalid value will be treated as “Lax”. This means that the cookie will no longer be sent in third-party contexts. If your application depends on this cookie being available in such contexts, please add the “SameSite=None“ attribute to it. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite",
|
||||
"Cookie “a” does not have a proper “SameSite” attribute value. Soon, cookies without the “SameSite” attribute or with an invalid value will be treated as “Lax”. This means that the cookie will no longer be sent in third-party contexts. If your application depends on this cookie being available in such contexts, please add the “SameSite=None“ attribute to it. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Reference/Headers/Set-Cookie#samesitesamesite-value",
|
||||
typeMessage1: ".warn",
|
||||
message2:
|
||||
"Cookie “b” does not have a proper “SameSite” attribute value. Soon, cookies without the “SameSite” attribute or with an invalid value will be treated as “Lax”. This means that the cookie will no longer be sent in third-party contexts. If your application depends on this cookie being available in such contexts, please add the “SameSite=None“ attribute to it. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite",
|
||||
"Cookie “b” does not have a proper “SameSite” attribute value. Soon, cookies without the “SameSite” attribute or with an invalid value will be treated as “Lax”. This means that the cookie will no longer be sent in third-party contexts. If your application depends on this cookie being available in such contexts, please add the “SameSite=None“ attribute to it. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Reference/Headers/Set-Cookie#samesitesamesite-value",
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
The DevTools toolbox is loaded in an iframe pointing to about:devtools-toolbox. This iframe has a [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) (CSP) applied, which will mitigate potential attacks. However this may limit the resources that can be loaded in the toolbox documenth.
|
||||
The DevTools toolbox is loaded in an iframe pointing to about:devtools-toolbox. This iframe has a [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CSP) (CSP) applied, which will mitigate potential attacks. However this may limit the resources that can be loaded in the toolbox documenth.
|
||||
|
||||
# Current DevTools CSP
|
||||
|
||||
@@ -12,7 +12,7 @@ This means:
|
||||
- `chrome://` and `resource://` are allowed for any resource
|
||||
- `chrome://` and `resource://` and `data://` are allowed for images
|
||||
|
||||
For more information about which resources and requests are in scope of the CSP, you can read the [default-src documentation on MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/default-src).
|
||||
For more information about which resources and requests are in scope of the CSP, you can read the [default-src documentation on MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Content-Security-Policy/default-src).
|
||||
|
||||
# Scope of the DevTools CSP
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ When you are inspecting a web app that utilizes a web socket connection, the web
|
||||
.. image:: wsi-filter.png
|
||||
:alt: WS filter in the network inspector
|
||||
|
||||
You can use the WS button to filter the list for just web socket connections. Only requests with the `101 status code <https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/101>`_ (WebSocket Protocol Handshake) are visible, which indicates that the server is switching to a web socket connection.
|
||||
You can use the WS button to filter the list for just web socket connections. Only requests with the `101 status code <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/101>`_ (WebSocket Protocol Handshake) are visible, which indicates that the server is switching to a web socket connection.
|
||||
|
||||
Clicking on a web socket request opens the usual sidebar to reveal additional details. Choose the **Response** tab to inspect web socket frames sent and received through the selected connection.
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ This includes:
|
||||
- Status: The response status code for the request; click the "?" icon to go to the reference page for the status code.
|
||||
- Version: The version of HTTP used.
|
||||
- Transferred: The amount of data transferred for the request.
|
||||
- Referrer policy: The value of the `Referrer-policy header <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy>`_.
|
||||
- Referrer policy: The value of the `Referrer-policy header <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Referrer-Policy>`_.
|
||||
|
||||
- **HTTP Early hints response headers** (when the request includes early hints)
|
||||
- **HTTP Response headers**
|
||||
@@ -84,16 +84,16 @@ The following information is shown only when the section is expanded:
|
||||
The following information is shown in both the collapsed and the expanded states:
|
||||
|
||||
|
||||
- **Status:** The `HTTP response code <https://developer.mozilla.org/en-US/docs/Web/HTTP/Status>`_ for the request.
|
||||
- **Status:** The `HTTP response code <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status>`_ for the request.
|
||||
- **Version**: The HTTP version used
|
||||
- **Transferred**: The amount of data transferred with the request
|
||||
- The **Referrer Policy**, which governs which referrer information, sent in the `Referer <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer>`_ header, should be included with requests. (See `Referrer-Policy <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy>`_ for a description of possible values)
|
||||
- The **Referrer Policy**, which governs which referrer information, sent in the `Referer <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Referer>`_ header, should be included with requests. (See `Referrer-Policy <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Referrer-Policy>`_ for a description of possible values)
|
||||
- **Blocking**: If the request is to a site that is associated with a known tracker, an icon and a message are shown; otherwise, this field is not shown.
|
||||
|
||||
Early hints response headers
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The `Early hints <https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/103>`_ response headers section shows the headers provided by HTTP 103 informational response. For each line in the early hints response headers section, a question mark links to the documentation for that response header, if one is available.
|
||||
The `Early hints <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/103>`_ response headers section shows the headers provided by HTTP 103 informational response. For each line in the early hints response headers section, a question mark links to the documentation for that response header, if one is available.
|
||||
|
||||
A **Raw** toggle button in the section heading controls whether the headers are shown with formatting, or as plain, unformatted text.
|
||||
|
||||
@@ -464,7 +464,7 @@ The *Request Timing* section breaks a network request down into the following su
|
||||
Server Timing
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
New in Firefox 71, the *Server Timing* section lists any information provided in the `Server-Timing <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Server-Timing>`_ header — this is used to surface any backend server timing metrics you've recorded (e.g. database read/write, CPU time, file system access, etc.).
|
||||
The *Server Timing* section lists any information provided in the `Server-Timing <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Server-Timing>`_ header — this is used to surface any backend server timing metrics you've recorded (e.g. database read/write, CPU time, file system access, etc.).
|
||||
|
||||
The header takes a series of descriptions and durations, which can be anything you like. In the above screenshot for example, the highlighted request's ``Server-Timing`` header contains 4 items — *data*, *markup*, *total*, and *miss*.
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ Just above the viewport there is a label "no device selected"; click this to see
|
||||
- Touch event simulation
|
||||
|
||||
|
||||
Additionally, Firefox sets the `User-Agent <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent>`_ HTTP request header to identify itself as the default browser on the selected device. For example, if you've selected an iPhone, then Firefox identifies itself as Safari. The `navigator.userAgent <https://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgent>`_ property is set to the same value.
|
||||
Additionally, Firefox sets the `User-Agent <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent>`_ HTTP request header to identify itself as the default browser on the selected device. For example, if you've selected an iPhone, then Firefox identifies itself as Safari. The `navigator.userAgent <https://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgent>`_ property is set to the same value.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
|
||||
@@ -190,10 +190,10 @@ The complete list of security messages is as follows:
|
||||
- The page contained mixed display content: that is, the main page was served over HTTPS, but asked the browser to load "display content", such as images, over HTTP. The browser loaded this display content. `Mixed Content <https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content>`_ for more details.
|
||||
|
||||
* - This site specified both an X-Content-Security-Policy/Report-Only header and a Content-Security-Policy/Report-Only header. The X-Content-Security-Policy/Report-Only header(s) will be ignored.
|
||||
- See `Content Security Policy <https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP>`_ for more details.
|
||||
- See `Content Security Policy <https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CSP>`_ for more details.
|
||||
|
||||
* - The X-Content-Security-Policy and X-Content-Security-Report-Only headers will be deprecated in the future. Please use the Content-Security-Policy and Content-Security-Report-Only headers with CSP spec compliant syntax instead.
|
||||
- See `Content Security Policy <https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP>`_ for more details.
|
||||
- See `Content Security Policy <https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CSP>`_ for more details.
|
||||
|
||||
* - Password fields present on an insecure (http://) page. This is a security risk that allows user login credentials to be stolen.
|
||||
- Pages containing login forms must be served over HTTPS, not HTTP.
|
||||
@@ -205,7 +205,7 @@ The complete list of security messages is as follows:
|
||||
- iframes containing login forms must be served over HTTPS, not HTTP.
|
||||
|
||||
* - The site specified an invalid Strict-Transport-Security header.
|
||||
- See `HTTP Strict Transport Security <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security>`_ for more details.
|
||||
- See `HTTP Strict Transport Security <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Strict-Transport-Security>`_ for more details.
|
||||
|
||||
* - This site makes use of a SHA-1 Certificate; it's recommended you use certificates with signature algorithms that use hash functions stronger than SHA-1.
|
||||
|
||||
|
||||
@@ -126,15 +126,15 @@ const INSECURE_PASSWORDS_LEARN_MORE =
|
||||
const PUBLIC_KEY_PINS_LEARN_MORE =
|
||||
"https://developer.mozilla.org/docs/Web/HTTP/Public_Key_Pinning";
|
||||
const STRICT_TRANSPORT_SECURITY_LEARN_MORE =
|
||||
"https://developer.mozilla.org/docs/Web/HTTP/Headers/Strict-Transport-Security";
|
||||
"https://developer.mozilla.org/docs/Web/HTTP/Reference/Headers/Strict-Transport-Security";
|
||||
const MIME_TYPE_MISMATCH_LEARN_MORE =
|
||||
"https://developer.mozilla.org/docs/Web/HTTP/Headers/X-Content-Type-Options";
|
||||
"https://developer.mozilla.org/docs/Web/HTTP/Reference/Headers/X-Content-Type-Options";
|
||||
const SOURCE_MAP_LEARN_MORE =
|
||||
"https://firefox-source-docs.mozilla.org/devtools-user/debugger/source_map_errors/";
|
||||
const TLS_LEARN_MORE =
|
||||
"https://blog.mozilla.org/security/2018/10/15/removing-old-versions-of-tls/";
|
||||
const X_FRAME_OPTIONS_LEARN_MORE =
|
||||
"https://developer.mozilla.org/docs/Web/HTTP/Headers/X-Frame-Options";
|
||||
"https://developer.mozilla.org/docs/Web/HTTP/Reference/Headers/X-Frame-Options";
|
||||
const REQUEST_STORAGE_ACCESS_LEARN_MORE =
|
||||
"https://developer.mozilla.org/docs/Web/API/Document/requestStorageAccess";
|
||||
const DOCTYPE_MODES_LEARN_MORE =
|
||||
@@ -161,7 +161,7 @@ const ErrorCategories = {
|
||||
};
|
||||
|
||||
const baseCorsErrorUrl =
|
||||
"https://developer.mozilla.org/docs/Web/HTTP/CORS/Errors/";
|
||||
"https://developer.mozilla.org/docs/Web/HTTP/Guides/CORS/Errors/";
|
||||
const corsParams =
|
||||
"?utm_source=devtools&utm_medium=firefox-cors-errors&utm_campaign=default";
|
||||
const CorsErrorDocs = {
|
||||
|
||||
Reference in New Issue
Block a user