From 3086ab2996403fbb4cf6525986e00e4a521ada1e Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Wed, 31 Jul 2013 23:40:46 +0400 Subject: MIME: use "application/javascript" for .js files. Though there are several MIME types commonly used for JavaScript nowadays, the most common being "text/javascript", "application/javascript", and currently used by nginx "application/x-javascript", RFC 4329 prefers "application/javascript". The "charset_types" directive's default value was adjusted accordingly. --- src/http/modules/ngx_http_charset_filter_module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/http/modules') diff --git a/src/http/modules/ngx_http_charset_filter_module.c b/src/http/modules/ngx_http_charset_filter_module.c index 27a00d09a..c9b7e9e89 100644 --- a/src/http/modules/ngx_http_charset_filter_module.c +++ b/src/http/modules/ngx_http_charset_filter_module.c @@ -128,7 +128,7 @@ ngx_str_t ngx_http_charset_default_types[] = { ngx_string("text/xml"), ngx_string("text/plain"), ngx_string("text/vnd.wap.wml"), - ngx_string("application/x-javascript"), + ngx_string("application/javascript"), ngx_string("application/rss+xml"), ngx_null_string }; -- cgit