Gzip e Yslow: hay 2 componentes de texto sin formato que deben enviarse comprimidos

I am running one of my sites through ySlow and I'm getting a 'C' on compress components with gzip stating: There are 2 plain text components that should be sent compressed.

These 2 files are my .css and .js file. Any thoughts as to these 2 files are the only ones not getting compressed. I saw on Stack Overflow that webkit and chrome don't support gzip on css and js files, but it was downvoted with no reasons.

preguntado el 10 de marzo de 12 a las 06:03

Could you link to the question/answer that said this? -

2 Respuestas

Many browsers, specifically Internet Explorer have just too many bugs related to compressed JS & CSS. They fail in very uniqe situations and such failures are difficult to catch during testing. Hence, it is advised not to compress CSS & JS.

respondido 10 mar '12, 07:03

Do you actually have evidence to support this? If it were true Google, Facebook, and just about every other top site wouldn't work as they all send CSS & JS gzip-ed. I also fail to see how this even answers the question. - Andrew Marshall

Heres one List. blogs.msdn.com/b/carloc/archive/2008/01/21/… Microsoft used to publish IE bugs DB, but couldn't find it now. Jetty's Compression Filter also skips compresison for many versions of IE by default because of similar reasons - Samarth Bhargava

Also, when I last checked a few years ago, most of the bugs had workarounds. If you are facebook & google, you have enough resources to ensure that you don't hit those bugs and if you do, you implement the workaround. Average enterprise teams don't have the luxury, and its much easier to let CSS & JS be uncompressed rather than spend time debuging weird bug reports. So, to answer the question, its good that these are not being compressed. Why will depend upon your web server/app server configuration. - Samarth Bhargava

The best advice today is to compress text content like CSS and JS for all browsers. IE6 prior to Service Pack 2 (released Aug 2004) did have some problems with gzip compression, leading to workarounds like the one described here: stackoverflow.com/questions/1456112/…. - BrianC

Typically web servers must be configured explicitly for the type of text files to serve gzipped/compressed. Those settings will depend on your web server (e.g., Apache vs IIS).

This article is a good walk-through of the benefits of compression, and includes details for configuring it for IIS or Apache: http://betterexplained.com/articles/how-to-optimize-your-site-with-gzip-compression/

respondido 11 mar '12, 18:03

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.