Enable strict MIME type checking for worker scripts
Jump to overview

Policy overview

Key metadata and intent for this policy.

Category
Microsoft Edge
Supported on
Microsoft Edge version 150, Windows 7 or later

Supported OS tags: Windows7

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.

Internal name
StrictMimetypeCheckForWorkerScriptsEnabled
Policy ID
596385343cac
Elements
0

Registry values

How enabled and disabled states update the registry.

ScopeRegistry locationTypeEnabled valueDisabled valueCopy
Path
Software\Policies\Microsoft\Edge
Value name
StrictMimetypeCheckForWorkerScriptsEnabled
REG_DWORD
HKLM
1
HKCU
1
HKLM
0
HKCU
0
Registry location
Type REG_DWORD · Both
Path
Software\Policies\Microsoft\Edge
Value name
StrictMimetypeCheckForWorkerScriptsEnabled
Hive
HKLM
Enabled value
1
Disabled value
0
Hive
HKCU
Enabled value
1
Disabled value
0

Policy elements

Inputs and configuration options exposed by this policy.

This policy has no additional user input fields.