Will Google release Javascript compression tool?

92 views
Skip to first unread message

markm

unread,
May 18, 2006, 10:22:39 PM5/18/06
to Google Web Toolkit
There doesn't seem to be a good javascript compressor/obfuscator
available that doesn't break code. Google must have an in-house tool
they've used on Maps etc.

Do they have any plans to provide this to the general public?

Having said that, I'm of two minds as to whether this is a good idea. I
think we've all benefited at some point from the unobfuscated code of
others and reverse engineering is such a bore.

Thanks.

Mark Maunder.

Tiago Serafim

unread,
May 18, 2006, 10:27:36 PM5/18/06
to Google-We...@googlegroups.com
Hi Mark,

I haven´t teste yet, but dojo compressor seems to be a excellent compressor...

Check it out: http://dojotoolkit.org/docs/compressor_system.html

Cheers, Tiago
--
Tiago Serafim

Mr. Monster

unread,
May 18, 2006, 10:42:57 PM5/18/06
to Google Web Toolkit
GWT automatically obfuscates the generated JavaScript, looks like it's
using the same algorithem as GMail obfuscation.

Bruce Johnson

unread,
May 18, 2006, 11:23:24 PM5/18/06
to Google-We...@googlegroups.com
GWT does obfuscate code by default, but you can also actually compress your compiled JavaScript with GZIP before you send it over the wire.  Just set up your web server to compress the *.cache.html files.  And you can send HTTP response headers allowing browsers to cache those files forever.  That's why the names of the generated scripts are unique (and funky-looking)...so that independent compiles can be cached permanently without ever accidentally being confused with each other.
 
Apply both techniques in combination for maximum speed: compression for fast initial download and never-stale caching for fast startup in subseqent runs. 
 
-- Bruce

Will Merydith

unread,
May 19, 2006, 12:06:59 AM5/19/06
to Google Web Toolkit
Bruce can you point to a reference that goes into more detail?

markm

unread,
May 19, 2006, 1:21:08 AM5/19/06
to Google Web Toolkit
Thanks Bruce, server-side gzip compression completelly slipped my mind.


Will, I don't use GWT - I am at this point merely an interested
spectator, but I have used mod_gzip with Apache web server to achieve
server compression of content before it is sent to the client. This
link may help:

http://www.google.com/search?hl=en&q=mod_gzip&btnG=Google+Search

Be advised there was a bug in Netscape (4.x I think) that caused style
sheets to not show up if they were compressed by the server. Hopefully
that isn't present in any of the newer browsers.

Bruce Johnson

unread,
May 19, 2006, 9:32:52 PM5/19/06
to Google-We...@googlegroups.com
We actually don't have the "best practices" HTTP headers documented yet, but we will add that to the list of things to add in a near-term doc update.

If you have an immediate need to get this working, let me know and I'll post details here when I get back into the office from JavaOne.

-- Bruce

nishant

unread,
Jun 14, 2006, 7:57:33 PM6/14/06
to Google Web Toolkit
Hi Bruce,

I am looking to obfuscate and compress my Javascript code. I have two
questions.

1. Is it possible to set up Google WebToolkit to obfuscate Javascript
code directly, or is it the case the WebToolkit can only obfuscate the
Java code (when it is compiled to javascript).

2. Also, I guess server side compression can only speed up transfers
but will still leave the javascript unobfuscated on the client side.(in
case the file on the server is unobfuscated).

Thanks for any help.
regards
Nishant.

> ------=_Part_26608_27480935.1148088772114
> Content-Type: text/html; charset=ISO-8859-1
> Content-Transfer-Encoding: quoted-printable
> X-Google-AttachSize: 772
>
> We actually don't have the "best practices" HTTP headers documented


> yet, but we will add that to the list of things to add in a near-term

> doc update.<br>
> <br>


> If you have an immediate need to get this working, let me know and I'll

> post details here when I get back into the office from JavaOne.<br>
> <br>
> -- Bruce<br><br><div><span class="gmail_quote">On 5/18/06, <b class="gmail_sendername">Will Merydith</b> &lt;<a href="mailto:Will.M...@gmail.com">Will.M...@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
> <br>Bruce can you point to a reference that goes into more detail?<br><br><br><br><br></blockquote></div><br>
>
> ------=_Part_26608_27480935.1148088772114--

Dave Brown

unread,
Aug 20, 2015, 2:38:24 AM8/20/15
to Google Web Toolkit, Google-We...@googlegroups.com
I got tired of the lack of tools to compress and obfuscate, so I have tried to tackle the issue.

www.whak.ca is a bunch of obfuscators I made.

www.scriptcompress.com will minify and use real compression (LZMA, ZIP, gzip, bzip, etc) that extracts VIA web browser client side inline/offline/online

Vassilis Virvilis

unread,
Aug 20, 2015, 3:34:05 AM8/20/15
to google-we...@googlegroups.com
Looks like an impressive collection.

Given that js scripts (and css and html) can be compressed / decompressed as part of the HTTP operation may I ask what are the benefits of compression at run time?

    Vassilis


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.



--
Vassilis Virvilis
Reply all
Reply to author
Forward
0 new messages