Ouvrir dans l'explorateur

Enable strict MIME type checking for worker scripts

Cette stratégie n'a pas de traduction française dans les modèles de l'éditeur ; le texte original est en anglais.

Type
Ordinateur et utilisateur
Chemin GPO
Configuration ordinateur › Stratégies › Modèles d'administration › Microsoft Edge Configuration utilisateur › Stratégies › Modèles d'administration › Microsoft Edge EN : Computer Configuration › Policies › Administrative Templates › Microsoft EdgeEN : User Configuration › Policies › Administrative Templates › Microsoft Edge
Pris en charge sur
Microsoft Edge version 150, Windows 7 or later
Fichier ADMX
msedge.admx
Nom interne
msedge/StrictMimetypeCheckForWorkerScriptsEnabled

Explication

This policy controls whether strict MIME type checking is used for worker scripts.

If you enable or don't configure this policy, worker scripts use strict MIME type checking for JavaScript. Worker scripts that use legacy MIME types are rejected.

If you disable this policy, worker scripts use lax MIME type checking. This allows worker scripts that use legacy MIME types, such as text/ascii, to continue to load and run.

Browsers traditionally used lax MIME type checking, which allowed JavaScript resources to load with several legacy MIME types. This behavior can create security risks by allowing resources to load as scripts when they weren't intended to be used that way.

Microsoft Edge uses strict MIME type checking by default. Enabling this policy follows the default behavior. Disabling this policy lets admins temporarily retain the legacy behavior for compatibility.

For more information about JavaScript and ECMAScript media types, see https://html.spec.whatwg.org/multipage/scripting.html#scriptingLanguage.

Registre

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Edge
HKEY_CURRENT_USER\Software\Policies\Microsoft\Edge
Nom de la valeur
StrictMimetypeCheckForWorkerScriptsEnabled
ÉtatValeur écrite
ActivéREG_DWORD = 1
DésactivéREG_DWORD = 0

PowerShell

Commandes PowerShell qui écrivent dans le registre ce que la stratégie écrirait. Les valeurs entre chevrons (<…>) sont à remplacer.

Écrire directement dans le registre contourne la stratégie de groupe : si une GPO gère cette valeur, elle sera réécrite au prochain gpupdate ; sinon la valeur reste en place (effet « tatouage »). Préférez une GPO ou, en local, LGPO.exe. Exécutez PowerShell en administrateur pour HKLM. Certaines stratégies demandent un redémarrage ou gpupdate /force.

Ordinateur (HKLM)

Activer

# Activer : msedge/StrictMimetypeCheckForWorkerScriptsEnabled
$k = 'HKLM:\Software\Policies\Microsoft\Edge'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'StrictMimetypeCheckForWorkerScriptsEnabled' -Value 1 -Type DWord

Désactiver

# Désactiver : msedge/StrictMimetypeCheckForWorkerScriptsEnabled
$k = 'HKLM:\Software\Policies\Microsoft\Edge'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'StrictMimetypeCheckForWorkerScriptsEnabled' -Value 0 -Type DWord

Revenir à « Non configuré »

# Revenir à « Non configuré » : msedge/StrictMimetypeCheckForWorkerScriptsEnabled
$k = 'HKLM:\Software\Policies\Microsoft\Edge'
Remove-ItemProperty -Path $k -Name 'StrictMimetypeCheckForWorkerScriptsEnabled' -ErrorAction SilentlyContinue

Utilisateur (HKCU)

Activer

Désactiver

Revenir à « Non configuré »

Application

Microsoft Edge (+ Edge Update, WebView2) (Microsoft) — modèles de novembre 2026

Modèles officiels téléchargés le 12 novembre 2026.