WebFaction
Community site: login faq

Running YSlow on my Plone site tells me to activate gzip compression on javascript files. Examining the headers, I see that some javascript has Content-Encoding: gzip, but some does not. The ones which do not, have:

Content-Type: application/x-javascript;charset=utf-8
  • Is that a valid Content-Type header? I see /usr/local/nginx/conf/nginx.conf has application/x-javascript among gzip_types, but nothing about the charset specification.
  • If not, how can I provide a configure file to tell nginx to compress this content type also?

asked 27 Jun '11, 01:23

Jean Jordaan
431615
accept rate: 33%

edited 27 Jun '11, 01:25


It is valid,

http://www.w3.org/International/O-charset

You can not use the nginx server to host media and use gzip compression, to take advantage of that you would have to use the shared Apache server for media.

permanent link

answered 27 Jun '11, 02:06

johns
5.4k412
accept rate: 23%

Update: we actually do compress things being directly served by the nginx server,

gzip_types text/plain text/css application/x-javascript text/xml application/javascript application/xml application/xml+rss text/javascript application/json;

However they must be served directly from the nginx server, if they are served by the back-end Zope/Plone server than they might need configuration there. Could you possibly provide the link to the file that is not being gziped?

(27 Jun '11, 02:12) johns

I've logged an issue with a link to an uncompressed file, along with the request/response headers: YYE-975939

(27 Jun '11, 03:31) Jean Jordaan

Although this is an old post I wanted to update it, we no longer compress things as gzip the above nginx conf is overridden on all static sites with

gzip off;
(15 Mar '14, 00:34) johns
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×186
×23
×14

question asked: 27 Jun '11, 01:23

question was seen: 14,887 times

last updated: 15 Mar '14, 00:34

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM