diff --git a/files/zh-tw/_redirects.txt b/files/zh-tw/_redirects.txt index 92fdb088e0fff2..440f40715c2293 100644 --- a/files/zh-tw/_redirects.txt +++ b/files/zh-tw/_redirects.txt @@ -244,7 +244,7 @@ /zh-TW/docs/JavaScript/Obsolete_Pages/Obsolete_Pages/Obsolete_Pages/預先定義的函數/isFinite_函數 /zh-TW/docs/Web/JavaScript/Guide/Functions /zh-TW/docs/JavaScript/Obsolete_Pages/Obsolete_Pages/Obsolete_Pages/預先定義的函數/isNaN_函數 /zh-TW/docs/Web/JavaScript/Guide/Functions /zh-TW/docs/JavaScript/Obsolete_Pages/Obsolete_Pages/Obsolete_Pages/預先定義的核心物件 /zh-TW/docs/Web/JavaScript/Guide -/zh-TW/docs/JavaScript/Same_origin_policy_for_JavaScript /zh-TW/docs/Web/Security/Same-origin_policy +/zh-TW/docs/JavaScript/Same_origin_policy_for_JavaScript /zh-TW/docs/Web/Security/Defenses/Same-origin_policy /zh-TW/docs/JavaScript_technologies_overview /zh-TW/docs/Web/JavaScript/Reference/JavaScript_technologies_overview /zh-TW/docs/JavaScript_technologies_overview-redirect-1 /zh-TW/docs/Web/JavaScript/Reference/JavaScript_technologies_overview /zh-TW/docs/JavaScript_typed_arrays /zh-TW/docs/Web/JavaScript/Guide/Typed_arrays @@ -465,7 +465,7 @@ /zh-TW/docs/SVG/Tutorial/填充与边框 /zh-TW/docs/Web/SVG/Tutorials/SVG_from_scratch/Fills_and_strokes /zh-TW/docs/SVG/Tutorial/渐变 /zh-TW/docs/Web/SVG/Tutorials/SVG_from_scratch/Gradients /zh-TW/docs/SVG/教學 /zh-TW/docs/Web/SVG/Tutorials/SVG_from_scratch -/zh-TW/docs/Security/MixedContent /zh-TW/docs/Web/Security/Mixed_content +/zh-TW/docs/Security/MixedContent /zh-TW/docs/Web/Security/Defenses/Mixed_content /zh-TW/docs/Security/弱簽章演算法 /zh-TW/docs/Glossary/Hash_function /zh-TW/docs/Security/缺少安全性的密碼 /zh-TW/docs/Web/Security/Authentication/Passwords /zh-TW/docs/Tools https://firefox-source-docs.mozilla.org/devtools-user/index.html @@ -970,7 +970,7 @@ /zh-TW/docs/Web/JavaScript/Obsolete_Pages/Obsolete_Pages/Obsolete_Pages/預先定義的核心物件 /zh-TW/docs/Web/JavaScript/Guide /zh-TW/docs/Web/JavaScript/Reference/Global_Objects/Array/@@iterator /zh-TW/docs/Web/JavaScript/Reference/Global_Objects/Array/Symbol.iterator /zh-TW/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment /zh-TW/docs/Web/JavaScript/Reference/Operators/Destructuring -/zh-TW/docs/Web/JavaScript/Same_origin_policy_for_JavaScript /zh-TW/docs/Web/Security/Same-origin_policy +/zh-TW/docs/Web/JavaScript/Same_origin_policy_for_JavaScript /zh-TW/docs/Web/Security/Defenses/Same-origin_policy /zh-TW/docs/Web/JavaScript/Shells /zh-TW/docs/Web/JavaScript/Reference/JavaScript_technologies_overview /zh-TW/docs/Web/JavaScript/Typed_arrays /zh-TW/docs/Web/JavaScript/Guide/Typed_arrays /zh-TW/docs/Web/JavaScript/資料結構 /zh-TW/docs/Web/JavaScript/Guide/Data_structures @@ -998,6 +998,8 @@ /zh-TW/docs/Web/SVG/Tutorial/渐变 /zh-TW/docs/Web/SVG/Tutorials/SVG_from_scratch/Gradients /zh-TW/docs/Web/SVG/教學 /zh-TW/docs/Web/SVG/Tutorials/SVG_from_scratch /zh-TW/docs/Web/Security/Insecure_passwords /zh-TW/docs/Web/Security/Authentication/Passwords +/zh-TW/docs/Web/Security/Mixed_content /zh-TW/docs/Web/Security/Defenses/Mixed_content +/zh-TW/docs/Web/Security/Same-origin_policy /zh-TW/docs/Web/Security/Defenses/Same-origin_policy /zh-TW/docs/Web/Security/Weak_Signature_Algorithm /zh-TW/docs/Glossary/Hash_function /zh-TW/docs/Web/Tutorials /zh-TW/docs/MDN/Tutorials /zh-TW/docs/Web/URI/Authority/Choosing_between_www_and_non-www_URLs /zh-TW/docs/Web/URI/Guides/Choosing_between_www_and_non-www_URLs diff --git a/files/zh-tw/_wikihistory.json b/files/zh-tw/_wikihistory.json index 82e014995d6f99..3e10676c008d93 100644 --- a/files/zh-tw/_wikihistory.json +++ b/files/zh-tw/_wikihistory.json @@ -6012,7 +6012,7 @@ "jwhitlock" ] }, - "Web/Security/Mixed_content": { + "Web/Security/Defenses/Mixed_content": { "modified": "2019-03-23T23:04:08.690Z", "contributors": [ "jackblackevo", @@ -6022,7 +6022,7 @@ "Asheesh" ] }, - "Web/Security/Same-origin_policy": { + "Web/Security/Defenses/Same-origin_policy": { "modified": "2020-09-01T23:06:58.364Z", "contributors": [ "JustBelieveMe", diff --git a/files/zh-tw/glossary/cors/index.md b/files/zh-tw/glossary/cors/index.md index 58ecc29c65b997..db2f8465d7b149 100644 --- a/files/zh-tw/glossary/cors/index.md +++ b/files/zh-tw/glossary/cors/index.md @@ -5,7 +5,7 @@ slug: Glossary/CORS **CORS**(跨來源資源共享)是瀏覽器技術規範,用來傳輸 [HTTP 標頭](/zh-TW/docs/Web/HTTP/Reference/Headers),判斷阻擋或允許不同來源網域的資源存取。 -[同源安全政策(same-origin security policy)](/zh-TW/docs/Web/Security/Same-origin_policy),預設會禁止跨網域的資源請求。CORS 賦予網站伺服器跨網域存取控制能力,使其能安全地跨網域傳輸資料。 +[同源安全政策(same-origin security policy)](/zh-TW/docs/Web/Security/Defenses/Same-origin_policy),預設會禁止跨網域的資源請求。CORS 賦予網站伺服器跨網域存取控制能力,使其能安全地跨網域傳輸資料。 ## CORS 標頭 diff --git a/files/zh-tw/learn_web_development/core/scripting/what_is_javascript/index.md b/files/zh-tw/learn_web_development/core/scripting/what_is_javascript/index.md index a1fb83e150ea63..ee6e1567ab033c 100644 --- a/files/zh-tw/learn_web_development/core/scripting/what_is_javascript/index.md +++ b/files/zh-tw/learn_web_development/core/scripting/what_is_javascript/index.md @@ -255,7 +255,7 @@ JavaScript 套用到你的 HTML 頁面的方式與 CSS 類似。CSS 使用 {{htm } ``` -4. 儲存並重新整理你的瀏覽器。你會發現點擊按鈕沒有任何效果,如果你檢查瀏覽器的主控台,你會看到類似 `Cross-origin request blocked` 的錯誤。這是因為像許多外部資源一樣,JavaScript 模組需要從與 HTML [同源](/zh-TW/docs/Web/Security/Same-origin_policy)的地方載入,而 `file://` URL 不符合資格。有兩種解決方案可以解決這個問題: +4. 儲存並重新整理你的瀏覽器。你會發現點擊按鈕沒有任何效果,如果你檢查瀏覽器的主控台,你會看到類似 `Cross-origin request blocked` 的錯誤。這是因為像許多外部資源一樣,JavaScript 模組需要從與 HTML [同源](/zh-TW/docs/Web/Security/Defenses/Same-origin_policy)的地方載入,而 `file://` URL 不符合資格。有兩種解決方案可以解決這個問題: - 我們推薦的解決方案是[設定一個本地測試伺服器](/zh-TW/docs/Learn_web_development/Howto/Tools_and_setup/set_up_a_local_testing_server)。在伺服器程式執行並在 `8000` 埠提供 `apply-javascript-external.html` 和 `script.js` 檔案的情況下,打開你的瀏覽器並前往 `http://localhost:8000`。 - 如果你無法執行本地伺服器,你也可以使用 `` 來代替 ``。更多資訊請參見下文的[腳本載入策略](#腳本載入策略)。但請注意,我們在教學其他部分使用的功能可能無論如何都需要本地 HTTP 伺服器。 5. 現在網站的運作方式和以前完全一樣,但現在我們的 JavaScript 在一個外部檔案中。這在組織程式碼和使其可在多個 HTML 檔案中重複使用方面通常是件好事。此外,沒有大塊腳本塞在裡面,HTML 也更容易閱讀。 diff --git a/files/zh-tw/mdn/writing_guidelines/page_structures/banners_and_notices/index.md b/files/zh-tw/mdn/writing_guidelines/page_structures/banners_and_notices/index.md index 51e38340ea6536..012b97fce7d7fe 100644 --- a/files/zh-tw/mdn/writing_guidelines/page_structures/banners_and_notices/index.md +++ b/files/zh-tw/mdn/writing_guidelines/page_structures/banners_and_notices/index.md @@ -13,7 +13,7 @@ l10n: ## 橫幅巨集加入的位置 -橫幅使用巨集加入,且通常插入在頁面後設資料下方與側邊欄巨集並列。例如,在下方區塊中,`\{{SecureContext_Header}}` 巨集用來表示 {{domxref("AudioDecoder")}} 介面僅能在[安全上下文](/zh-TW/docs/Web/Security/Secure_Contexts)中使用、`\{{AvailableInWorkers}}` 巨集用來表示 {{domxref("AudioDecoder")}} 介面僅能在 [Window 上下文](/zh-TW/docs/Web/API/Window)與[專用 Worker 上下文](/zh-TW/docs/Web/API/DedicatedWorkerGlobalScope)中使用,而 `\{{SeeCompatTable}}` 則用來表示該介面為實驗性技術。 +橫幅使用巨集加入,且通常插入在頁面後設資料下方與側邊欄巨集並列。例如,在下方區塊中,`\{{SecureContext_Header}}` 巨集用來表示 {{domxref("AudioDecoder")}} 介面僅能在[安全上下文](/zh-TW/docs/Web/Security/Defenses/Secure_Contexts)中使用、`\{{AvailableInWorkers}}` 巨集用來表示 {{domxref("AudioDecoder")}} 介面僅能在 [Window 上下文](/zh-TW/docs/Web/API/Window)與[專用 Worker 上下文](/zh-TW/docs/Web/API/DedicatedWorkerGlobalScope)中使用,而 `\{{SeeCompatTable}}` 則用來表示該介面為實驗性技術。 ```md --- @@ -32,7 +32,7 @@ browser-compat: api.AudioDecoder 必須手動加入下列巨集: -- `\{{SecureContext_Header}}`——這會產生一個**安全上下文**橫幅,表示該技術僅能在[安全上下文](/zh-TW/docs/Web/Security/Secure_Contexts)中使用。 +- `\{{SecureContext_Header}}`——這會產生一個**安全上下文**橫幅,表示該技術僅能在[安全上下文](/zh-TW/docs/Web/Security/Defenses/Secure_Contexts)中使用。 - `\{{AvailableInWorkers}}`——這會產生一個**可在 Worker 使用**通知,表示該技術在 [Worker 上下文](/zh-TW/docs/Web/API/Web_Workers_API)中可用。 ## 自動加入的橫幅 diff --git a/files/zh-tw/mdn/writing_guidelines/page_structures/page_types/api_constructor_subpage_template/index.md b/files/zh-tw/mdn/writing_guidelines/page_structures/page_types/api_constructor_subpage_template/index.md index cfdb7ccf775d80..7e57a0504d6d18 100644 --- a/files/zh-tw/mdn/writing_guidelines/page_structures/page_types/api_constructor_subpage_template/index.md +++ b/files/zh-tw/mdn/writing_guidelines/page_structures/page_types/api_constructor_subpage_template/index.md @@ -55,7 +55,7 @@ l10n: > > 你應根據以下建議更新或移除下列巨集: > -> - `\{{SecureContext_Header}}`——此巨集會生成一個**安全上下文**橫幅,表示該技術僅在[安全上下文](/zh-TW/docs/Web/Security/Secure_Contexts)中可用。如果該技術非安全上下文專用,則可移除此巨集呼叫。如果是,則你還應在[受限於安全環境的功能](/zh-TW/docs/Web/Security/Secure_Contexts/features_restricted_to_secure_contexts)頁面中為其新增條目。 +> - `\{{SecureContext_Header}}`——此巨集會生成一個**安全上下文**橫幅,表示該技術僅在[安全上下文](/zh-TW/docs/Web/Security/Defenses/Secure_Contexts)中可用。如果該技術非安全上下文專用,則可移除此巨集呼叫。如果是,則你還應在[受限於安全環境的功能](/zh-TW/docs/Web/Security/Defenses/Secure_Contexts/features_restricted_to_secure_contexts)頁面中為其新增條目。 > - `\{{AvailableInWorkers}}`——此巨集會生成一個 **Worker 可用**的註記,表示該技術在 [Worker 上下文](/zh-TW/docs/Web/API/Web_Workers_API)中可用。如果該技術僅在 window 上下文中可用,則可移除此巨集呼叫。如果該技術也或僅在 Worker 上下文中可用,則你可能需要傳遞參數以指明其可用性(請參閱 [\\{{AvailableInWorkers}} 巨集原始碼](https://github.com/mdn/rari/blob/main/crates/rari-doc/src/templ/templs/banners.rs)了解所有可用值),並可能需在 [Worker 中可用的 Web API](/zh-TW/docs/Web/API/Web_Workers_API/Functions_and_classes_available_to_workers#worker_中可用的_web_api) 頁面中為其新增條目。 > - `\{{APIRef("GroupDataName")}}`——此巨集會生成左側參考側邊欄,顯示與當前頁面相關的快速參考連結。例如,[WebVR API](/zh-TW/docs/Web/API/WebVR_API) 中的每個頁面都有相同的側邊欄,指向該 API 的其他頁面。若要為你的 API 生成正確的側邊欄,你需要在我們的 GitHub repo 中新增一個 `GroupData` 條目,並在巨集呼叫中以 _GroupDataName_ 替換該條目名稱。請參閱我們的 [API 參考側邊欄指南](/zh-TW/docs/MDN/Writing_guidelines/Howto/Write_an_api_reference/Sidebars)以獲取更多資訊。 > - 複製此頁面時,請記得移除 `\{{MDNSidebar}}` 巨集。 diff --git a/files/zh-tw/mdn/writing_guidelines/page_structures/page_types/api_event_subpage_template/index.md b/files/zh-tw/mdn/writing_guidelines/page_structures/page_types/api_event_subpage_template/index.md index ea3106c6b2fcc4..c0ccafc8b00000 100644 --- a/files/zh-tw/mdn/writing_guidelines/page_structures/page_types/api_event_subpage_template/index.md +++ b/files/zh-tw/mdn/writing_guidelines/page_structures/page_types/api_event_subpage_template/index.md @@ -51,7 +51,7 @@ l10n: > > 需要根據以下建議更新或刪除這些巨集: > -> - `\{{SecureContext_Header}}`——這會產生一個**安全上下文**橫幅,指示該技術僅在[安全性上下文](/zh-TW/docs/Web/Security/Secure_Contexts)中可用。如果不是,則可以刪除巨集呼叫。如果是,則也應在[僅限安全性上下文的功能](/zh-TW/docs/Web/Security/Secure_Contexts/features_restricted_to_secure_contexts)頁面中填入該巨集所呼叫的條目。 +> - `\{{SecureContext_Header}}`——這會產生一個**安全上下文**橫幅,指示該技術僅在[安全性上下文](/zh-TW/docs/Web/Security/Defenses/Secure_Contexts)中可用。如果不是,則可以刪除巨集呼叫。如果是,則也應在[僅限安全性上下文的功能](/zh-TW/docs/Web/Security/Defenses/Secure_Contexts/features_restricted_to_secure_contexts)頁面中填入該巨集所呼叫的條目。 > - `\{{AvailableInWorkers}}`——這會產生一個 **Worker 可用**註釋,表示該技術在 [Worker 上下文](/zh-TW/docs/Web/API/Web_Workers_API)中可用。如果它僅在 Window 上下文中可用,則可以刪除此巨集呼叫。如果它也可用或僅在 Worker 上下文中可用,那麼由於它的可用性,你可能還需要向其傳遞參數(有關所有可用值,請參閱 [\\{{AvailableInWorkers}} 巨集原始碼](https://github.com/mdn/rari/blob/main/crates/rari-doc/src/templ/templs/banners.rs)),你可能還需要在 [Worker 中可用的 Web API](/zh-TW/docs/Web/API/Web_Workers_API/Functions_and_classes_available_to_workers#worker_中可用的_web_api) 頁面中為其填入項目。 > - `\{{APIRef("GroupDataName")}}`——這將產生左側參考側邊欄,顯示與目前頁面相關的快速參考連結。例如,[WebVR API](/zh-TW/docs/Web/API/WebVR_API) 中的每個頁面都有相同的側邊欄,指向 API 中的其他頁面。若要為你的 API 產生正確的側邊欄,你需要在我們的 GitHub 倉庫中新增一個 GroupData 條目,並在巨集呼叫中包含該條目的名稱來取代 _GroupDataName_。有關如何操作的信息,請參閱我們的 [API 參考側邊欄](/zh-TW/docs/MDN/Writing_guidelines/Howto/Write_an_api_reference/Sidebars)指南。 > diff --git a/files/zh-tw/web/api/indexeddb_api/using_indexeddb/index.md b/files/zh-tw/web/api/indexeddb_api/using_indexeddb/index.md index 544e5683a379e5..e9bd78d4cc43c0 100644 --- a/files/zh-tw/web/api/indexeddb_api/using_indexeddb/index.md +++ b/files/zh-tw/web/api/indexeddb_api/using_indexeddb/index.md @@ -515,7 +515,7 @@ function useDatabase(db) { ## 安全性 -IndexedDB 遵守[同源政策](/zh-TW/docs/Web/Security/Same-origin_policy),所以它綁定創建它的來源網站,其他來源網站無法存取。就像對載入 {{ HTMLElement("frame") }} 和 {{ HTMLElement("iframe") }} 網頁的第三方 cookie 所設下的安全性和隱私權考量限制,IndexedDB 無法在載入 {{ HTMLElement("frame") }} 和 {{ HTMLElement("iframe") }} 網頁上運作,詳情請見 [Firefox bug 595307](https://bugzil.la/595307)。 +IndexedDB 遵守[同源政策](/zh-TW/docs/Web/Security/Defenses/Same-origin_policy),所以它綁定創建它的來源網站,其他來源網站無法存取。就像對載入 {{ HTMLElement("frame") }} 和 {{ HTMLElement("iframe") }} 網頁的第三方 cookie 所設下的安全性和隱私權考量限制,IndexedDB 無法在載入 {{ HTMLElement("frame") }} 和 {{ HTMLElement("iframe") }} 網頁上運作,詳情請見 [Firefox bug 595307](https://bugzil.la/595307)。 ## 瀏覽器關閉風險 diff --git a/files/zh-tw/web/api/web_workers_api/using_web_workers/index.md b/files/zh-tw/web/api/web_workers_api/using_web_workers/index.md index 753b18ee4aefb9..cc3d75cb3043d1 100644 --- a/files/zh-tw/web/api/web_workers_api/using_web_workers/index.md +++ b/files/zh-tw/web/api/web_workers_api/using_web_workers/index.md @@ -89,7 +89,7 @@ myWorker.onmessage = function (e) { 拿到存在事件 data 中的計算值後,我們接著將值以 `textContent` 顯示出來。 > [!NOTE] -> 建構 `Worker` 的 URI 必須遵從[same-origin policy](/zh-TW/docs/Web/Security/Same-origin_policy)。目前各家瀏覽器在這方面存有歧異,Gecko 10.0 以後允許 data URI 而 Internet Explorer 10 不允許 Blob URI。 +> 建構 `Worker` 的 URI 必須遵從[同源政策](/zh-TW/docs/Web/Security/Defenses/Same-origin_policy)。目前各家瀏覽器在這方面存有歧異,Gecko 10.0 以後允許 data URI 而 Internet Explorer 10 不允許 Blob URI。 > [!NOTE] > 在主執行緒中存取 `onmessage` 與 `postMessage` 需要主動掛在 worker 物件上,在 worker 執行緒則不用,這是因為 worker 執行緒的全域物件便是 worker 物件。 diff --git a/files/zh-tw/web/api/window/localstorage/index.md b/files/zh-tw/web/api/window/localstorage/index.md index 8035516d26f230..4686ef55f4dd22 100644 --- a/files/zh-tw/web/api/window/localstorage/index.md +++ b/files/zh-tw/web/api/window/localstorage/index.md @@ -19,7 +19,7 @@ l10n: - `SecurityError` - : 在以下情況之一會拋出: - - 同源不是[一個有效的協定/主機/埠元組](/zh-TW/docs/Web/Security/Same-origin_policy#同源定義)。舉例來說,如果同源使用 `file:` 或 `data:` 協定,就可能發生這種情況。 + - 同源不是[一個有效的協定/主機/埠元組](/zh-TW/docs/Web/Security/Defenses/Same-origin_policy#同源定義)。舉例來說,如果同源使用 `file:` 或 `data:` 協定,就可能發生這種情況。 - 請求違反了政策決定。例如,使用者已將瀏覽器組態為防止頁面保存資料。 請注意,如果使用者封鎖了 Cookie,瀏覽器可能會將此解釋為防止頁面保存資料的指令。 diff --git a/files/zh-tw/web/html/reference/elements/a/index.md b/files/zh-tw/web/html/reference/elements/a/index.md index 2d6dc1773eb4d0..975421d8419a11 100644 --- a/files/zh-tw/web/html/reference/elements/a/index.md +++ b/files/zh-tw/web/html/reference/elements/a/index.md @@ -40,7 +40,7 @@ li { > [!NOTE] > - > - `download` 只適用於[同源 URL](/zh-TW/docs/Web/Security/Same-origin_policy),或者 `blob:` 和 `data:` 方案。 + > - `download` 只適用於[同源 URL](/zh-TW/docs/Web/Security/Defenses/Same-origin_policy),或者 `blob:` 和 `data:` 方案。 > - 瀏覽器如何處理下載因瀏覽器、用戶設置和其他因素而異。用戶在下載開始之前可能會收到提示,文件可能會自動保存,或者它可能會自動打開,無論是在外部應用程序中還是在瀏覽器本身中。 > - 如果 `Content-Disposition` 標頭與 `download` 屬性的信息不同,則結果行為可能不同: > - 如果標頭指定了 `filename`,則優先於 `download` 屬性中指定的文件名。 @@ -63,7 +63,7 @@ li { - `referrerpolicy` - : 跟隨連結時發送的[引用者](/zh-TW/docs/Web/HTTP/Reference/Headers/Referer)的程度。 - `no-referrer`:不發送 {{HTTPHeader("Referer")}} 標頭。 - - `no-referrer-when-downgrade`:不發送 {{HTTPHeader("Referer")}} 標頭至沒有 {{Glossary("TLS")}}({{Glossary("HTTPS")}})的[來源](/zh-TW/docs/Web/Security/Same-origin_policy)。 + - `no-referrer-when-downgrade`:不發送 {{HTTPHeader("Referer")}} 標頭至沒有 {{Glossary("TLS")}}({{Glossary("HTTPS")}})的[來源](/zh-TW/docs/Web/Security/Defenses/Same-origin_policy)。 - `origin`:發送的引用者將僅限於引用頁面的來源:其[協定](/zh-TW/docs/Learn_web_development/Howto/Web_mechanics/What_is_a_URL)、{{Glossary("host", "主機")}}和{{Glossary("port", "通訊埠")}}。 - `origin-when-cross-origin`:發送給其他來源的引用者將僅限於協定、主機和端口。對同一來源的導航仍將包含路徑。 - `same-origin`:對於{{Glossary("Same-origin policy", "同一來源")}},將發送引用者,但跨來源請求將不包含引用者信息。 diff --git a/files/zh-tw/web/html/reference/elements/script/index.md b/files/zh-tw/web/html/reference/elements/script/index.md index 3e421dae68f704..c2c2fd5e48b73f 100644 --- a/files/zh-tw/web/html/reference/elements/script/index.md +++ b/files/zh-tw/web/html/reference/elements/script/index.md @@ -41,7 +41,7 @@ slug: Web/HTML/Reference/Elements/script - `fetchpriority` - : Scripts with the `defer` attribute will execute in the order in which they appear in the document.This attribute allows the elimination of **parser-blocking JavaScript** where the browser would have to load and evaluate scripts before continuing to parse. `async` has a similar effect in this case. - `integrity` - - : This attribute contains inline metadata that a user agent can use to verify that a fetched resource has been delivered free of unexpected manipulation. See [Subresource Integrity](/zh-TW/docs/Web/Security/Subresource_Integrity). + - : This attribute contains inline metadata that a user agent can use to verify that a fetched resource has been delivered free of unexpected manipulation. See [Subresource Integrity](/zh-TW/docs/Web/Security/Defenses/Subresource_Integrity). - `nomodule` - : 這個布林屬性,會要求支援 [ES2015 modules](https://hacks.mozilla.org/2015/08/es6-in-depth-modules/) 的瀏覽器,不執行裡面的程式。這能用來給不支援 JavaScript 模組的老舊瀏覽器,提供用於向下支援的服務。 - `nonce` diff --git a/files/zh-tw/web/http/guides/cors/index.md b/files/zh-tw/web/http/guides/cors/index.md index 8fc3ed042e5a6f..adae574fcef9cc 100644 --- a/files/zh-tw/web/http/guides/cors/index.md +++ b/files/zh-tw/web/http/guides/cors/index.md @@ -9,7 +9,7 @@ l10n: 一個跨來源請求的範例:從 `https://domain-a.com` 提供的前端 JavaScript 代碼使用 {{domxref("fetch()")}} 請求 `https://domain-b.com/data.json`。 -出於安全原因,瀏覽器限制從腳本發起的跨來源 HTTP 請求。例如,`fetch()` 和 {{domxref("XMLHttpRequest")}} 遵循[同源政策](/zh-TW/docs/Web/Security/Same-origin_policy)。這意味著,使用這些 API 的 Web 應用程序只能請求與加載該應用程序的相同來源的資源,除非來自其他來源的回應包含正確的 CORS 標頭。 +出於安全原因,瀏覽器限制從腳本發起的跨來源 HTTP 請求。例如,`fetch()` 和 {{domxref("XMLHttpRequest")}} 遵循[同源政策](/zh-TW/docs/Web/Security/Defenses/Same-origin_policy)。這意味著,使用這些 API 的 Web 應用程序只能請求與加載該應用程序的相同來源的資源,除非來自其他來源的回應包含正確的 CORS 標頭。 ![CORS 機制示意圖](cors_principle.png) diff --git a/files/zh-tw/web/http/reference/headers/strict-transport-security/index.md b/files/zh-tw/web/http/reference/headers/strict-transport-security/index.md index f0b03831896803..e23aee6ddb7fcf 100644 --- a/files/zh-tw/web/http/reference/headers/strict-transport-security/index.md +++ b/files/zh-tw/web/http/reference/headers/strict-transport-security/index.md @@ -99,7 +99,7 @@ Strict-Transport-Security: max-age=63072000; includeSubDomains; preload ## 參見 -- [僅限安全上下文的功能](/zh-TW/docs/Web/Security/Secure_Contexts/features_restricted_to_secure_contexts) +- [僅限安全上下文的功能](/zh-TW/docs/Web/Security/Defenses/Secure_Contexts/features_restricted_to_secure_contexts) - [HTTP 嚴格傳輸安全已經推出!](https://blog.sidstamm.com/2010/08/http-strict-transport-security-has.html)(blog.sidstamm.com(2010)) - [HTTP 嚴格傳輸安全(強制使用 HTTPS)](https://hacks.mozilla.org/2010/08/firefox-4-http-strict-transport-security-force-https/)(hacks.mozilla.org(2010)) - [HTTP 嚴格傳輸安全](https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Strict_Transport_Security_Cheat_Sheet.html)(owasp.org 上的速查表) diff --git a/files/zh-tw/web/http/reference/headers/x-frame-options/index.md b/files/zh-tw/web/http/reference/headers/x-frame-options/index.md index 9619b0c12c627f..1b8b433fa78ea3 100644 --- a/files/zh-tw/web/http/reference/headers/x-frame-options/index.md +++ b/files/zh-tw/web/http/reference/headers/x-frame-options/index.md @@ -17,7 +17,7 @@ slug: Web/HTTP/Reference/Headers/X-Frame-Options - `DENY` - : 表示網頁無論如何都無法被嵌入到 frame 中,即使於相同網域內嵌入也不允許。 - `SAMEORIGIN` - - : 唯有當符合[同源政策](/zh-TW/docs/Web/Security/Same-origin_policy)下,才能被嵌入到 frame 中。 + - : 唯有當符合[同源政策](/zh-TW/docs/Web/Security/Defenses/Same-origin_policy)下,才能被嵌入到 frame 中。 - `ALLOW-FROM uri` {{deprecated_inline}} - : 唯有列表許可的 URI 才能嵌入到 frame 中。新版瀏覽器已不再支援此指令。 diff --git a/files/zh-tw/web/http/reference/status/421/index.md b/files/zh-tw/web/http/reference/status/421/index.md index 6a730138481751..157af8a36670db 100644 --- a/files/zh-tw/web/http/reference/status/421/index.md +++ b/files/zh-tw/web/http/reference/status/421/index.md @@ -42,6 +42,6 @@ Server: Apache/2.4.1 (Unix) - [HTTP 回應狀態碼](/zh-TW/docs/Web/HTTP/Reference/Status) - [多個主機與錯誤導向請求](https://httpd.apache.org/docs/2.4/mod/mod_http2.html#misdirected) Apache 伺服器文件 -- [TLS 1.3](/zh-TW/docs/Web/Security/Transport_Layer_Security#tls_1.3) +- [TLS 1.3](/zh-TW/docs/Web/Security/Defenses/Transport_Layer_Security#tls_1.3) - [伺服器名稱指示(SNI)](https://en.wikipedia.org/wiki/Server_Name_Indication) - [傳輸層安全性(TLS)配置](/zh-TW/docs/Web/Security/Practical_implementation_guides/TLS) diff --git a/files/zh-tw/web/http/reference/status/425/index.md b/files/zh-tw/web/http/reference/status/425/index.md index 05c68e5b438327..db6dcd94c45c01 100644 --- a/files/zh-tw/web/http/reference/status/425/index.md +++ b/files/zh-tw/web/http/reference/status/425/index.md @@ -7,7 +7,7 @@ l10n: HTTP **`425 Too Early`** [用戶端錯誤回應](/zh-TW/docs/Web/HTTP/Reference/Status#用戶端錯誤回應)狀態碼表示伺服器不願意冒險處理可能會被重放的請求,以避免潛在的重放攻擊。 -如果用戶端最近與伺服器有互動,則早期數據(也稱為零往返時間[(0-RTT)數據](/zh-TW/docs/Web/Security/Transport_Layer_Security#tls_1.3))允許用戶端在連線的第一個往返中向伺服器發送數據,而無需等待 TLS [握手](/zh-TW/docs/Glossary/TCP_handshake)完成。使用早期數據發送請求的用戶端不需要包含 `Early-Data` 標頭。更多資訊請參閱 {{HTTPHeader("Early-Data")}}。 +如果用戶端最近與伺服器有互動,則早期數據(也稱為零往返時間[(0-RTT)數據](/zh-TW/docs/Web/Security/Defenses/Transport_Layer_Security#tls_1.3))允許用戶端在連線的第一個往返中向伺服器發送數據,而無需等待 TLS [握手](/zh-TW/docs/Glossary/TCP_handshake)完成。使用早期數據發送請求的用戶端不需要包含 `Early-Data` 標頭。更多資訊請參閱 {{HTTPHeader("Early-Data")}}。 ## 狀態 @@ -26,5 +26,5 @@ HTTP **`425 Too Early`** [用戶端錯誤回應](/zh-TW/docs/Web/HTTP/Reference/ ## 參見 - [HTTP 回應狀態碼](/zh-TW/docs/Web/HTTP/Reference/Status) -- [TLS 1.3](/zh-TW/docs/Web/Security/Transport_Layer_Security#tls_1.3) +- [TLS 1.3](/zh-TW/docs/Web/Security/Defenses/Transport_Layer_Security#tls_1.3) - {{HTTPHeader("Early-Data")}} diff --git a/files/zh-tw/web/security/mixed_content/index.md b/files/zh-tw/web/security/defenses/mixed_content/index.md similarity index 93% rename from files/zh-tw/web/security/mixed_content/index.md rename to files/zh-tw/web/security/defenses/mixed_content/index.md index b1d130ecec036e..1f33a74e90775b 100644 --- a/files/zh-tw/web/security/mixed_content/index.md +++ b/files/zh-tw/web/security/defenses/mixed_content/index.md @@ -1,15 +1,13 @@ --- title: 混合內容 -slug: Web/Security/Mixed_content +slug: Web/Security/Defenses/Mixed_content --- -{{QuickLinksWithSubpages("/zh-TW/docs/Web/Security")}} - -當使用者以 {{Glossary("HTTPS")}} 瀏覽網站時,他們與伺服器之間的連線就會以 {{Glossary("TLS")}} 加密,以防受到竊聽或中間人攻擊。一個含有 HTTP 明文內容的 HTTPS 頁面稱為**混合內容(mixed content)**。這種頁面只有部份加密,沒有加密的內容,易於遭到竊聽和中間人攻擊。這會令網頁不安全。 +當使用者以 {{Glossary("HTTPS")}} 瀏覽網站時,他們與伺服器之間的連線就會以 {{Glossary("TLS")}} 加密,以防受到竊聽或中間人攻擊。一個含有 HTTP 明文內容的 HTTPS 頁面稱為**混合內容**(mixed content)。這種頁面只有部份加密,沒有加密的內容,易於遭到竊聽和中間人攻擊。這會令網頁不安全。 ## 混合內容的類型 -混合內容的類型有兩種:**被動/顯示型混合內容(mixed passive/display content)**與**主動型混合內容(mixed active content)**。兩者不同處在於內容遭中間人攻擊竄改後,其最壞情況下的威脅程度。如果是被動型混合內容,威脅程度較低(可能有錯誤內容、或者用戶的 cookie 遭到竊取)。如果是主動型混合內容,威脅就可能會變成網絡釣魚、敏感資料洩露、被重定向到惡意網站……等等。 +混合內容的類型有兩種:**被動/顯示型混合內容**(mixed passive/display content)與**主動型混合內容**(mixed active content)。兩者不同處在於內容遭中間人攻擊竄改後,其最壞情況下的威脅程度。如果是被動型混合內容,威脅程度較低(可能有錯誤內容、或者用戶的 cookie 遭到竊取)。如果是主動型混合內容,威脅就可能會變成網絡釣魚、敏感資料洩露、被重定向到惡意網站……等等。 ### 被動/顯示型混合內容 diff --git a/files/zh-tw/web/security/same-origin_policy/index.md b/files/zh-tw/web/security/defenses/same-origin_policy/index.md similarity index 98% rename from files/zh-tw/web/security/same-origin_policy/index.md rename to files/zh-tw/web/security/defenses/same-origin_policy/index.md index 912f6cc888ceed..05eeccd55e9f3b 100644 --- a/files/zh-tw/web/security/same-origin_policy/index.md +++ b/files/zh-tw/web/security/defenses/same-origin_policy/index.md @@ -1,10 +1,8 @@ --- title: 同源政策(Same-origin policy) -slug: Web/Security/Same-origin_policy +slug: Web/Security/Defenses/Same-origin_policy --- -{{QuickLinksWithSubpages("/zh-TW/docs/Web/Security")}} - 同源政策限制了程式碼和不同網域資源間的互動。 ## 同源定義