Skip to content

Commit a2fbc25

Browse files
WillTaylorDevdinasaur404
authored andcommitted
Add changelog for js returned content-type (#24673)
* Add changelog for js returned content-type * Update 2025-08-25-workers-assets-javascript-content-type.mdx small change * Include when change applies --------- Co-authored-by: dinasaur404 <[email protected]>
1 parent adff1bf commit a2fbc25

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
JavaScript asset responses have been updated 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.
19+
20+
Users will see this change on the next deployment of their assets.

0 commit comments

Comments
 (0)