Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

Re: [OT] Gzip compression of script files

Mike Baroukh

2007-08-14

Replies:

I had problems on IE where compression of gzip didn't works.
On the first page load, we had javascript error.
On the second page load, it works because the ungzipped file was in cache.
If we clear browser cache, we have the error again ...

It seems to happened It happend on slow machines.

so, be careful with it. I personally never gzip .js.

Mike


Sebastian Kolbe a écrit :
> Hello,
>
> First of all: You should open a new thread for new questions. Answering to
> existing threads might conceal your message for most people.
>
> Anyway:
> Compressing javascript, css and other files is possible if the browser
> supports this.
> The simplest solution for this is to install a webserver (i.e. apache)
> additional
> to your application server so that a request goes through the web
> server. This webserver
> can be configured to compress content, probably also HTML files or other
> content;
> look for 'mod_deflate'.
> If everything is right you should then have a transparent compression
> for selected
> filetypes w/o needing to compress anything "manually".
>
> An other approach is to use a javascript "compressor" like
> http://compressor.ebiene.de/ which converts/eliminates white spaces and
> word wrapping.
>

--

Mike Baroukh

---
Cardiweb - 31 Rue de Mogador Paris IXeme
06 63 57 27 22 - 01 53 21 82 63 - Jabber: mbaroukh@(protected)
http://www.cardiweb.com
---


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.