Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學

IE11 User-Agent 字串導致網站誤判為 Firefox?兩種修正方法

編輯:Win8 系統基礎知識

IE11 的 User-Agent (UA) 字串移除「MSIE」關鍵字並加入「Gecko」,導致許多網站誤判為 Firefox,造成版面錯亂或功能異常。UA 字串範例:
Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko

方法一:使用相容性檢視 (針對特定網站)

  1. IE11 右上角齒輪 →「相容性檢視設定」。
  2. 在「加入這個網站」輸入網域 (如 example.com) →「加入」。
    相容性檢視設定
  3. 該網站將以 IE10 相容模式呈現,UA 字串包含「MSIE 10.0」。

方法二:透過群組原則修改自訂 UA 字串 (全域生效)

  1. 按 Win+R 輸入 gpedit.msc 開啟群組原則編輯器。
    群組原則編輯器
  2. 依序展開:電腦設定 → 系統管理範本 → Windows 元件 → Internet Explorer → 使用者代理程式字串自訂。
  3. 雙擊「設定使用者代理程式字串」→ 選「已啟用」→ 在選項輸入 MSIE 8.0 (或 MSIE 10.0)。
    自訂 UA 字串
  4. 確定並重新啟動 IE11 生效。

注意

方法二需 Windows 8.1 專業版/企業版 (家用版無 gpedit.msc),修改 UA 可能影響部分現代網站的功能偵測,建議優先使用方法一針對個別網站處理。

Copyright © Windows教程網 All Rights Reserved