diff --git a/src/html/template/js.go b/src/html/template/js.go
index 33a18b41864cc7..2b0af328f82610 100644
--- a/src/html/template/js.go
+++ b/src/html/template/js.go
@@ -391,6 +391,7 @@ func isJSType(mimeType string) bool {
"application/ecmascript",
"application/javascript",
"application/json",
+ "application/ld+json",
"application/x-ecmascript",
"application/x-javascript",
"text/ecmascript",
diff --git a/src/html/template/js_test.go b/src/html/template/js_test.go
index 12a850d6e3bfe6..05fa105be02c70 100644
--- a/src/html/template/js_test.go
+++ b/src/html/template/js_test.go
@@ -343,6 +343,7 @@ func TestIsJsMimeType(t *testing.T) {
{"application/javascript/version=1.8", false},
{"text/javascript", true},
{"application/json", true},
+ {"application/ld+json", true},
}
for _, test := range tests {