Skip to content

Commit 93e44c3

Browse files
committed
Add changelog for js returned content-type
1 parent 807955c commit 93e44c3

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: Content type returned in Workers Assets for Javascript files is now `text/javascript`
3+
description: Updated JavaScript asset responses to use the standardized text/javascript Content-Type header (previously `application/javascript`) for better alignment with the HTML spec and browser expectations.
4+
products:
5+
- workers
6+
date: 2025-08-25
7+
---
8+
9+
We updated JavaScript asset responses to use the `text/javascript` Content-Type header instead of `application/javascript`. While both MIME types are widely supported by browsers, the HTML Living Standard explicitly recommends `text/javascript` as the preferred type going forward.
10+
11+
This change improves:
12+
13+
- Standards alignment: Ensures consistency with the HTML spec and modern web platform guidance.
14+
- Interoperability: Some developer tools, validators, and proxies expect text/javascript and may warn or behave inconsistently with application/javascript.
15+
- Future-proofing: By following the spec-preferred MIME type, we reduce the risk of deprecation warnings or unexpected behavior in evolving browser environments.
16+
- Consistency: Most frameworks, CDNs, and hosting providers now default to text/javascript, so this change matches common ecosystem practice.
17+
18+
Because all major browsers accept both MIME types, this update is backwards compatible and should not cause breakage.

0 commit comments

Comments
 (0)