diff --git a/files/en-us/glossary/preflight_request/index.md b/files/en-us/glossary/preflight_request/index.md index 7dd7361a1462b38..25e11a7306dbd1d 100644 --- a/files/en-us/glossary/preflight_request/index.md +++ b/files/en-us/glossary/preflight_request/index.md @@ -17,7 +17,7 @@ For example, a client might be asking a server if it would allow a {{HTTPMethod( OPTIONS /resource/foo Access-Control-Request-Method: DELETE Access-Control-Request-Headers: x-requested-with -Origin: https://foo.bar.org +Origin: https://www.example.com ``` If the server allows it, then it will respond to the preflight request with an {{HTTPHeader("Access-Control-Allow-Methods")}} response header, which lists `DELETE`: @@ -25,7 +25,7 @@ If the server allows it, then it will respond to the preflight request with an { ```http HTTP/1.1 204 No Content Connection: keep-alive -Access-Control-Allow-Origin: https://foo.bar.org +Access-Control-Allow-Origin: https://www.example.com Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE Access-Control-Allow-Headers: X-Requested-With Access-Control-Max-Age: 86400 diff --git a/files/en-us/learn_web_development/extensions/forms/basic_native_form_controls/index.md b/files/en-us/learn_web_development/extensions/forms/basic_native_form_controls/index.md index 7545e5b0f38fff7..f8c3989dfebf55d 100644 --- a/files/en-us/learn_web_development/extensions/forms/basic_native_form_controls/index.md +++ b/files/en-us/learn_web_development/extensions/forms/basic_native_form_controls/index.md @@ -285,7 +285,7 @@ If the image button is used to submit the form, this control doesn't submit its So for example when you click on the image at coordinate (123, 456) and it submits via the `get` method, you'll see the values appended to the URL as follows: ```url -http://foo.com?pos.x=123&pos.y=456 +https://example.com?pos.x=123&pos.y=456 ``` This is a very convenient way to build a "hot map". How these values are sent and retrieved is detailed in the [Sending form data](/en-US/docs/Learn_web_development/Extensions/Forms/Sending_and_retrieving_form_data) article. diff --git a/files/en-us/learn_web_development/extensions/forms/sending_and_retrieving_form_data/index.md b/files/en-us/learn_web_development/extensions/forms/sending_and_retrieving_form_data/index.md index 25da7a708bea6b7..702eeef197157cd 100644 --- a/files/en-us/learn_web_development/extensions/forms/sending_and_retrieving_form_data/index.md +++ b/files/en-us/learn_web_development/extensions/forms/sending_and_retrieving_form_data/index.md @@ -55,10 +55,10 @@ The {{HTMLElement("form")}} element defines how the data will be sent. All of it The [`action`](/en-US/docs/Web/HTML/Reference/Elements/form#action) attribute defines where the data gets sent. Its value must be a valid relative or absolute [URL](/en-US/docs/Learn_web_development/Howto/Web_mechanics/What_is_a_URL). If this attribute isn't provided, the data will be sent to the URL of the page containing the form — the current page. -In this example, the data is sent to an absolute URL — `https://example.com`: +In this example, the data is sent to an absolute URL — `https://www.example.com`: ```html -
+
``` Here, we use a relative URL — the data is sent to a different URL on the same origin: @@ -93,7 +93,7 @@ The [`GET` method](/en-US/docs/Web/HTTP/Reference/Methods/GET) is the method use Consider the following form: ```html -
+
@@ -108,7 +108,7 @@ Consider the following form: ``` -Since the `GET` method has been used, you'll see the URL `www.foo.com/?say=Hi&to=Mom` appear in the browser address bar when you submit the form. +Since the `GET` method has been used, you'll see the URL `https://www.example.com/greet?say=Hi&to=Mom` appear in the browser address bar when you submit the form. ![The changed url with query parameters after submitting the form with GET method with a "server not found" browser error page](url-parameters.png) @@ -121,7 +121,7 @@ The HTTP request looks like this: ```http GET /?say=Hi&to=Mom HTTP/2.0 -Host: foo.com +Host: example.com ``` > [!NOTE] @@ -137,7 +137,7 @@ The [`POST` method](/en-US/docs/Web/HTTP/Reference/Methods/POST) is a little dif Let's look at an example — this is the same form we looked at in the `GET` section above, but with the [`method`](/en-US/docs/Web/HTML/Reference/Elements/form#method) attribute set to `POST`. ```html -
+
@@ -156,7 +156,7 @@ When the form is submitted using the `POST` method, you get no data appended to ```http POST / HTTP/2.0 -Host: foo.com +Host: example.com Content-Type: application/x-www-form-urlencoded Content-Length: 13 @@ -178,7 +178,7 @@ HTTP requests are never displayed to the user (if you want to see them, you need 1. Open the developer tools. 2. Select "Network" 3. Select "All" -4. Select "foo.com" in the "Name" tab +4. Select "example.com" in the "Name" tab 5. Select "Request" (Firefox) or "Payload" (Chrome/Edge) You can then get the form data, as shown in the image below. @@ -292,7 +292,10 @@ If you want to send files, you need to take three extra steps: For example: ```html - +
diff --git a/files/en-us/mozilla/add-ons/webextensions/api/declarativenetrequest/index.md b/files/en-us/mozilla/add-ons/webextensions/api/declarativenetrequest/index.md index 71478c96b7b6497..b2aab2bac944f5f 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/declarativenetrequest/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/declarativenetrequest/index.md @@ -37,7 +37,7 @@ The declarative rules are defined by four fields: > - the action does not change the request. > - the redirect URL is invalid (e.g., the value of {{WebExtAPIRef("declarativeNetRequest.redirect","redirect.regexSubstitution")}} is not a valid URL). -This is an example rule that blocks all script requests originating from `"foo.com"` to any URL with `"abc"` as a substring: +This is an example rule that blocks all script requests originating from `"example.com"` to any URL with `"abc"` as a substring: ```json { @@ -46,7 +46,7 @@ This is an example rule that blocks all script requests originating from `"foo.c "action": { "type": "block" }, "condition": { "urlFilter": "abc", - "initiatorDomains": ["foo.com"], + "initiatorDomains": ["example.com"], "resourceTypes": ["script"] } } diff --git a/files/en-us/web/api/backgroundfetchregistration/match/index.md b/files/en-us/web/api/backgroundfetchregistration/match/index.md index c006169f88826af..ff86329134aecd8 100644 --- a/files/en-us/web/api/backgroundfetchregistration/match/index.md +++ b/files/en-us/web/api/backgroundfetchregistration/match/index.md @@ -31,7 +31,7 @@ match(request, options) - : A boolean value that specifies whether to ignore the query string in the URL. For example, if set to `true` the `?value=bar` part of - `http://foo.com/?value=bar` would be ignored when performing a match. + `https://example.com/?value=bar` would be ignored when performing a match. It defaults to `false`. - `ignoreMethod` {{optional_inline}} - : A boolean value. When `true`, diff --git a/files/en-us/web/api/backgroundfetchregistration/matchall/index.md b/files/en-us/web/api/backgroundfetchregistration/matchall/index.md index e540c0a5cf8e135..d33341d97a234b8 100644 --- a/files/en-us/web/api/backgroundfetchregistration/matchall/index.md +++ b/files/en-us/web/api/backgroundfetchregistration/matchall/index.md @@ -32,7 +32,7 @@ matchAll(request,options) - : A boolean value that specifies whether to ignore the query string in the URL. For example, if set to `true` the `?value=bar` part of - `http://foo.com/?value=bar` would be ignored when performing a match. + `https://example.com/?value=bar` would be ignored when performing a match. It defaults to `false`. - `ignoreMethod` {{optional_inline}} - : A boolean value. When `true`, diff --git a/files/en-us/web/api/cache/delete/index.md b/files/en-us/web/api/cache/delete/index.md index c9cb5bbdea467c3..bff4a9b1a4b35ba 100644 --- a/files/en-us/web/api/cache/delete/index.md +++ b/files/en-us/web/api/cache/delete/index.md @@ -28,7 +28,7 @@ delete(request, options) The available options are: - `ignoreSearch` - : A boolean value that specifies whether the matching process should ignore the query string in the URL. - If set to `true`, the `?value=bar` part of `http://foo.com/?value=bar` would be ignored when performing a match. + If set to `true`, the `?value=bar` part of `https://example.com/?value=bar` would be ignored when performing a match. It defaults to `false`. - `ignoreMethod` - : A boolean value that, when set to diff --git a/files/en-us/web/api/cache/keys/index.md b/files/en-us/web/api/cache/keys/index.md index 81d7dce5896bb01..ea30ff1a4e01705 100644 --- a/files/en-us/web/api/cache/keys/index.md +++ b/files/en-us/web/api/cache/keys/index.md @@ -38,7 +38,7 @@ keys(request, options) - : A boolean value that specifies whether the matching process should ignore the query string in the URL. If set to `true`, the `?value=bar` part of - `http://foo.com/?value=bar` would be ignored when performing a match. + `https://example.com/?value=bar` would be ignored when performing a match. It defaults to `false`. - `ignoreMethod` - : A boolean value that, when set to diff --git a/files/en-us/web/api/cache/match/index.md b/files/en-us/web/api/cache/match/index.md index 83047658565ce2b..de1a4419385282b 100644 --- a/files/en-us/web/api/cache/match/index.md +++ b/files/en-us/web/api/cache/match/index.md @@ -30,7 +30,7 @@ match(request, options) - : A boolean value that specifies whether to ignore the query string in the URL. For example, if set to `true` the `?value=bar` part of - `http://foo.com/?value=bar` would be ignored when performing a match. + `https://example.com/?value=bar` would be ignored when performing a match. It defaults to `false`. - `ignoreMethod` - : A boolean value that, when set to diff --git a/files/en-us/web/api/cache/matchall/index.md b/files/en-us/web/api/cache/matchall/index.md index ab95d333ebc8ec8..907c1fb6e27dcb8 100644 --- a/files/en-us/web/api/cache/matchall/index.md +++ b/files/en-us/web/api/cache/matchall/index.md @@ -33,7 +33,7 @@ matchAll(request, options) - : A boolean value that specifies whether the matching process should ignore the query string in the URL. If set to `true`, the `?value=bar` part of - `http://foo.com/?value=bar` would be ignored when performing a match. + `https://example.com/?value=bar` would be ignored when performing a match. It defaults to `false`. - `ignoreMethod` - : A boolean value that, when set to diff --git a/files/en-us/web/api/cachestorage/match/index.md b/files/en-us/web/api/cachestorage/match/index.md index 4a3ed94a6bb42b6..066ecb612083fb5 100644 --- a/files/en-us/web/api/cachestorage/match/index.md +++ b/files/en-us/web/api/cachestorage/match/index.md @@ -38,7 +38,7 @@ match(request, options) - : A boolean value that specifies whether the matching process should ignore the query string in the URL. For example, if set to `true`, the `?value=bar` part of - `http://foo.com/?value=bar` would be ignored when performing a match. + `https://example.com/?value=bar` would be ignored when performing a match. It defaults to `false`. - `ignoreMethod` - : A boolean value that, when set to diff --git a/files/en-us/web/api/htmlelement/hidden/index.md b/files/en-us/web/api/htmlelement/hidden/index.md index 871d959477800aa..5c618797951c178 100644 --- a/files/en-us/web/api/htmlelement/hidden/index.md +++ b/files/en-us/web/api/htmlelement/hidden/index.md @@ -34,7 +34,7 @@ The HTML contains two panels: a welcome panel, that asks users to agree to be aw ```html
-

Welcome to Foobar.com!

+

Welcome to my website!

By clicking "OK" you agree to be awesome today!

diff --git a/files/en-us/web/api/url/url/index.md b/files/en-us/web/api/url/url/index.md index cbc6a41d447eb58..a464907f7be8fac 100644 --- a/files/en-us/web/api/url/url/index.md +++ b/files/en-us/web/api/url/url/index.md @@ -99,8 +99,8 @@ new URL("", "https://example.com/?query=1"); new URL("/a", "https://example.com/?query=1"); // => 'https://example.com/a' (see relative URLs) -new URL("//foo.com", "https://example.com"); -// => 'https://foo.com/' (see relative URLs) +new URL("//foo.example", "https://example.com"); +// => 'https://foo.example/' (see relative URLs) ``` ## Specifications diff --git a/files/en-us/web/css/reference/at-rules/@media/color-index/index.md b/files/en-us/web/css/reference/at-rules/@media/color-index/index.md index 44d3bec6613cdfc..f7f39052cf39ed6 100644 --- a/files/en-us/web/css/reference/at-rules/@media/color-index/index.md +++ b/files/en-us/web/css/reference/at-rules/@media/color-index/index.md @@ -51,11 +51,11 @@ p { This HTML will apply a special stylesheet for devices that have at least 256 colors. ```html - + + href="https://cdn.example.com/color-stylesheet.css" /> ``` ## Specifications diff --git a/files/en-us/web/css/reference/at-rules/@media/device-height/index.md b/files/en-us/web/css/reference/at-rules/@media/device-height/index.md index 347957467f1886c..29bebfe7df9cafb 100644 --- a/files/en-us/web/css/reference/at-rules/@media/device-height/index.md +++ b/files/en-us/web/css/reference/at-rules/@media/device-height/index.md @@ -27,7 +27,7 @@ The `device-height` feature is specified as a {{cssxref("<length>")}} valu + href="https://cdn.example.com/short-styles.css" /> ``` ## Specifications diff --git a/files/en-us/web/css/reference/at-rules/@media/device-width/index.md b/files/en-us/web/css/reference/at-rules/@media/device-width/index.md index 0dbd0dfc7464048..bb916e57532717f 100644 --- a/files/en-us/web/css/reference/at-rules/@media/device-width/index.md +++ b/files/en-us/web/css/reference/at-rules/@media/device-width/index.md @@ -27,7 +27,7 @@ The `device-width` feature is specified as a {{cssxref("<length>")}} value + href="https://cdn.example.com/narrow-styles.css" /> ``` ## Specifications diff --git a/files/en-us/web/http/guides/proxy_servers_and_tunneling/index.md b/files/en-us/web/http/guides/proxy_servers_and_tunneling/index.md index 04641a9eedc80a7..cd48342dc9f4eeb 100644 --- a/files/en-us/web/http/guides/proxy_servers_and_tunneling/index.md +++ b/files/en-us/web/http/guides/proxy_servers_and_tunneling/index.md @@ -69,7 +69,7 @@ function FindProxyForURL(url, host) { if (isResolvable(host)) { return "DIRECT"; } - return "PROXY proxy.mydomain.com:8080"; + return "PROXY proxy.example.com:8080"; } ``` diff --git a/files/en-us/web/http/guides/proxy_servers_and_tunneling/proxy_auto-configuration_pac_file/index.md b/files/en-us/web/http/guides/proxy_servers_and_tunneling/proxy_auto-configuration_pac_file/index.md index d060f4b436fb3c8..c13bd78bd30c289 100644 --- a/files/en-us/web/http/guides/proxy_servers_and_tunneling/proxy_auto-configuration_pac_file/index.md +++ b/files/en-us/web/http/guides/proxy_servers_and_tunneling/proxy_auto-configuration_pac_file/index.md @@ -584,7 +584,7 @@ function FindProxyForURL(url, host) { if (isResolvable(host)) { return "DIRECT"; } - return "PROXY proxy.mydomain.com:8080"; + return "PROXY proxy.example.com:8080"; } ``` @@ -594,12 +594,12 @@ The above requires consulting the DNS every time; it can be grouped intelligentl function FindProxyForURL(url, host) { if ( isPlainHostName(host) || - dnsDomainIs(host, ".mydomain.com") || + dnsDomainIs(host, ".example.com") || isResolvable(host) ) { return "DIRECT"; } - return "PROXY proxy.mydomain.com:8080"; + return "PROXY proxy.example.com:8080"; } ``` @@ -614,7 +614,7 @@ function FindProxyForURL(url, host) { if (isInNet(host, "192.0.2.172", "255.255.0.0")) { return "DIRECT"; } - return "PROXY proxy.mydomain.com:8080"; + return "PROXY proxy.example.com:8080"; } ``` @@ -624,12 +624,12 @@ Again, use of the DNS server in the above can be minimized by adding redundant r function FindProxyForURL(url, host) { if ( isPlainHostName(host) || - dnsDomainIs(host, ".mydomain.com") || + dnsDomainIs(host, ".example.com") || isInNet(host, "192.0.2.0", "255.255.0.0") ) { return "DIRECT"; } - return "PROXY proxy.mydomain.com:8080"; + return "PROXY proxy.example.com:8080"; } ``` @@ -650,14 +650,14 @@ All local accesses are desired to be direct. All proxy servers run on the port 8 ```js function FindProxyForURL(url, host) { - if (isPlainHostName(host) || dnsDomainIs(host, ".mydomain.com")) { + if (isPlainHostName(host) || dnsDomainIs(host, ".example.com")) { return "DIRECT"; } else if (shExpMatch(host, "*.com")) { - return "PROXY proxy1.mydomain.com:8080; PROXY proxy4.mydomain.com:8080"; + return "PROXY proxy1.example.com:8080; PROXY proxy4.example.com:8080"; } else if (shExpMatch(host, "*.edu")) { - return "PROXY proxy2.mydomain.com:8080; PROXY proxy4.mydomain.com:8080"; + return "PROXY proxy2.example.com:8080; PROXY proxy4.example.com:8080"; } - return "PROXY proxy3.mydomain.com:8080; PROXY proxy4.mydomain.com:8080"; + return "PROXY proxy3.example.com:8080; PROXY proxy4.example.com:8080"; } ``` @@ -670,13 +670,13 @@ Most of the standard JavaScript functionality is available for use in the `FindP ```js function FindProxyForURL(url, host) { if (url.startsWith("http:")) { - return "PROXY http-proxy.mydomain.com:8080"; + return "PROXY http-proxy.example.com:8080"; } else if (url.startsWith("ftp:")) { - return "PROXY ftp-proxy.mydomain.com:8080"; + return "PROXY ftp-proxy.example.com:8080"; } else if (url.startsWith("gopher:")) { - return "PROXY gopher-proxy.mydomain.com:8080"; + return "PROXY gopher-proxy.example.com:8080"; } else if (url.startsWith("https:") || url.startsWith("snews:")) { - return "PROXY security-proxy.mydomain.com:8080"; + return "PROXY security-proxy.example.com:8080"; } return "DIRECT"; } @@ -689,7 +689,7 @@ For example: ```js if (shExpMatch(url, "http:*")) { - return "PROXY http-proxy.mydomain.com:8080"; + return "PROXY http-proxy.example.com:8080"; } ``` diff --git a/files/en-us/web/http/reference/headers/access-control-allow-headers/index.md b/files/en-us/web/http/reference/headers/access-control-allow-headers/index.md index 170113f3e063def..db5341616aeb975 100644 --- a/files/en-us/web/http/reference/headers/access-control-allow-headers/index.md +++ b/files/en-us/web/http/reference/headers/access-control-allow-headers/index.md @@ -85,7 +85,7 @@ The preflight request below tells the server that we want to send a CORS `GET` r OPTIONS /resource/foo Access-Control-Request-Method: GET Access-Control-Request-Headers: content-type,x-requested-with -Origin: https://foo.bar.org +Origin: https://www.example.com ``` #### Response @@ -96,7 +96,7 @@ If the CORS request indicated by the preflight request is authorized, the server HTTP/1.1 200 OK Content-Length: 0 Connection: keep-alive -Access-Control-Allow-Origin: https://foo.bar.org +Access-Control-Allow-Origin: https://www.example.com Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE Access-Control-Allow-Headers: Content-Type, x-requested-with Access-Control-Max-Age: 86400 diff --git a/files/en-us/web/javascript/reference/global_objects/regexp/index.md b/files/en-us/web/javascript/reference/global_objects/regexp/index.md index 0d15e3dfd5c9aa8..b8bd78ccd59667f 100644 --- a/files/en-us/web/javascript/reference/global_objects/regexp/index.md +++ b/files/en-us/web/javascript/reference/global_objects/regexp/index.md @@ -277,7 +277,7 @@ The [Unicode property escapes](/en-US/docs/Web/JavaScript/Reference/Regular_expr ### Extracting subdomain name from URL ```js -const url = "http://xxx.domain.com"; +const url = "http://xxx.example.com"; console.log(/^https?:\/\/(.+?)\./.exec(url)[1]); // 'xxx' ``` diff --git a/files/en-us/web/progressive_web_apps/manifest/reference/start_url/index.md b/files/en-us/web/progressive_web_apps/manifest/reference/start_url/index.md index 883241f6c81978d..186b26dc2344617 100644 --- a/files/en-us/web/progressive_web_apps/manifest/reference/start_url/index.md +++ b/files/en-us/web/progressive_web_apps/manifest/reference/start_url/index.md @@ -76,7 +76,7 @@ If a non-same-origin `start_url` is specified, browsers will fallback to using t - **Fingerprinting**: - Encoding strings into `start_url` to uniquely identify users (e.g., server-assigned identifiers, such as `?user=123`, `/user/123/`, or `https://user123.foo.bar`) creates a persistent fingerprint. + Encoding strings into `start_url` to uniquely identify users (e.g., server-assigned identifiers, such as `?user=123`, `/user/123/`, or `https://user123.example.com`) creates a persistent fingerprint. Users may not be aware that their privacy-sensitive information can persist even after they've cleared site data. It is bad practice to include any information in `start_url` that could uniquely identify users.