快轉到主要內容

Web Develop

Cross-Origin Resource Sharing (CORS) 跨來源資源共用錯誤解決方法

Cross-Origin Resource Sharing (CORS) 跨來源資源共用錯誤解決方法

·932 字·2 分鐘
最近Y cheung 遇到了兩個典型 CORS error問題,XMLHttpRequest 和 Fetch 請求了跨來源資源被瀏覽器阻擋,記錄一下解決方法。 什麼是Cross-Origin Resource Sharing (CORS) 跨來源資源共用? # Cross-Origin Resource Sharing (CORS) is an HTTP-header based mechanism that allows a server to indicate any origins (domain, scheme, or port) other than its own from which a browser should permit loading resources. CORS also relies on a mechanism by which browsers make a “preflight” request to the server hosting the cross-origin resource, in order to check that the server will permit the actual request. In that preflight, the browser sends headers that indicate the HTTP method and headers that will be used in the actual request.
SEO 結構化資料指南

SEO 結構化資料指南

·803 字·2 分鐘
結構化資料是一種標準化格式,它提供網頁相關資訊並將網頁內容分類,有助於優化搜索引擎SEO。 ⚠ 即使網頁已正確加上標記,Google 也不能保證結構化資料一定會出現在搜尋結果中。
Windows下強制使用Chrome全屏模式

Windows下強制使用Chrome全屏模式

·361 字·1 分鐘
一般情況下,按 F12 可以讓Chrome瀏覽器進入全屏模式。 如需啟動Chrome時就以全屏模式打開某指定網頁,可以使用kiosk參數。具體操作如下: 在Chrome中創建某地址的快捷方式,比如我創建一個Google的。
瀏覽器自動填充autocomplete

瀏覽器自動填充autocomplete

·127 字·1 分鐘
瀏覽器自動填充功能已經流行很久了,用戶因此可以快速填充註冊表單節省時間。 Autocomplete標籤包含了一些基本的值,包括tel,email,number,name等。