Official (or unofficial) compressed version of Prototype 1.6?

229 views
Skip to first unread message

jerpix

unread,
Oct 2, 2008, 6:43:26 PM10/2/08
to Prototype: Core
Hi,

I've been using Prototype 1.6 for a while now but I want to improve
load times -- is there an official or unofficial compressed version of
Prototype 1.6? What do you guys use?

I might just make a stripped down version myself for what I need.. but
I'd love to use Prototype if I could.

Thanks

Tom Gregory

unread,
Oct 3, 2008, 12:22:43 AM10/3/08
to prototy...@googlegroups.com
There is no official compressed version.

I use jsmin. (jsmin.org) Other tools work too.

Some use "proto-packed" http://groups.google.com/group/prototype-core/files
but I don't know whether it's up to date. (You'll have to check.)

There is also the Google-hosted version. It's not compressed, but if
your users visit other sites that also access the URL, it'll be cached.
http://code.google.com/apis/ajaxlibs/


TAG

Yanick

unread,
Oct 3, 2008, 7:04:32 AM10/3/08
to Prototype: Core
Hi Tom,
The Prototype version hosted by Google seems not to be compressed. I
haven't look deep, but if it loads this URL
http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.2/prototype.js ,
then it is not compressed.

yanick

Tom Gregory

unread,
Oct 3, 2008, 8:23:07 AM10/3/08
to prototy...@googlegroups.com
Isn't that what I said? The advantage from Google is not compression,
but caching (if multiple sites use it).

There was talk at one point of releasing an official compressed
version so Google could use it. I don't remember the outcome of that
conversation.


TAG

Andrew Dupont

unread,
Oct 3, 2008, 10:34:17 AM10/3/08
to Prototype: Core
Google's version is gzipped. Prototype 1.6, when gzipped, is only 28K
over the wire. And with Google's content distribution network and
proper cache settings, it'll be downloaded only once. This is what
people should be using if they want a compressed version.

(http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype.js)

If they want a self-hosted "compressed" version, and can't use gzip,
then they should use JDD's "protopacked" distribution.

Cheers,
Andrew

Tom Gregory

unread,
Oct 3, 2008, 10:49:10 AM10/3/08
to prototy...@googlegroups.com
Thanks, Andrew. I'm glad to be corrected on this.


TAG

jerpix

unread,
Oct 3, 2008, 12:46:10 PM10/3/08
to Prototype: Core
So Andrew, are you suggesting I use the one from
http://groups.google.com/group/prototype-core/files
under the file:
protopack_v2.1.zip >> prototype-1.6.0.2-shrinkvars.js.gz (24 kb)?

John-David Dalton

unread,
Oct 5, 2008, 1:30:52 AM10/5/08
to Prototype: Core
jerpix please read:
http://groups.google.com/group/prototype-scriptaculous/browse_thread/thread/3a9e634a63afc5c0/bb512d5fe0b8fffa?lnk=gst#bb512d5fe0b8fffa
for info on how to setup mod_deflate on your server.

Also please read the readme_first.txt included with ProtoPack.
(for future questions on ProtoPack email me directly).

The gzipped versions (js.gz) where included in the pack to show you
what the filesize could become.
They are not really intended for use, unless you have to use a hack to
make mod_rewrite detect if the .gz file is present and serve it as
the .js file requested.

For the smallest filesize the "shrinkvars" js version is best (it
gzips the best).
If you setup your server with mod_deflate or other gzip modules it
will automatically
gzip the files for you (mod_deflate sacrificed a bit of CPU power on
your server because it gzips the file on each request).

I will try to push an updated pack including Prototype 1.6.0.3 soon.
(including a customized version of Dean Edwards Packer 3, compatible
with Prototype's $super variable).

Thanx,
JDD

John-David Dalton

unread,
Oct 7, 2008, 12:25:12 PM10/7/08
to Prototype: Core
Ok, I have updated ProtoPack to v2.20.
This update includes Prototype 1.6.0.3 and a customized version of
Dean Edwards' Packer 3 that supports Prototype 1.6+ use of $super
variable.
Please read the readme_first.txt and the changelog.txt.

protopack_v2.20.zip
http://code.google.com/p/protosafe/downloads/list
http://groups-beta.google.com/group/prototype-core/files

- JDD

Shadow

unread,
Oct 7, 2008, 1:40:26 PM10/7/08
to Prototype: Core
I would be great if core team can add a minified version to the google
api, I think having both versions would be great (having a non
minified version reduced the ySlow grade btw) but if we could have
something like:

http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.2/min/prototype.js
(notice the /min/ before the filename...)

whiteShadow


On Oct 7, 12:25 pm, John-David Dalton <John.David.Dal...@gmail.com>
wrote:

Andrew Dupont

unread,
Oct 7, 2008, 2:12:27 PM10/7/08
to Prototype: Core
The gzipped version hosted on Google's servers is 28K; JDD's packed-
and-gzipped version in ProtoPack is 24K. I don't think it's worth the
trouble.

Cheers,
Andrew
> > protopack_v2.20.ziphttp://code.google.com/p/protosafe/downloads/listhttp://groups-beta.g...
>
> > - JDD

John-David Dalton

unread,
Oct 13, 2008, 1:50:35 AM10/13/08
to Prototype: Core
Prototype 1.6.0.3 unmodified + gzipped from Google's servers:
http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype.js
Firebug reports it's 31kb. On my filesystem it's 29,998 bytes.

Prototype 1.6.0.3 minified + gzipped:
Firebug reports it's 22kb. On my filesystem it's 21,564 bytes.

Saved 9kb.

* * * * * *

Scriptaculous 1.8.1 unmodified + gzipped from Google's servers
(includes builder, effects, dragdrop, controls, slider, sound by
default):
http://ajax.googleapis.com/ajax/libs/scriptaculous/1.8.1/scriptaculous.js
Firebug reports it's 7 requests and 33kb total. On my filesystem it's
~30,235 bytes.

Scriptaculous 1.8.1 minified + gzipped (includes builder, effects,
dragdrop, controls, slider, sound):
Firebug reports it's 21kb total. On my filesystem it's 20,246 bytes.

Saved 12kb
Include Prototype's 9kb savings for * 21kb total saved. *

* * * * * *

Prototype 1.6.0.3 + Scriptaculous 1.8.1 unmodified + gzipped from
Google's servers (includes effects):
http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype.js
http://ajax.googleapis.com/ajax/libs/scriptaculous/1.8.1/scriptaculous.js?load=effects
Firebug reports it's 3 requests and 42kb total.

Prototype 1.6.0.3 + Scriptaculous 1.8.1 minified + gzipped (includes
effects):
Firebug reports it's 29kb total. On my filesystem it's 28,138 bytes.

Saved 13kb

* * * * * *

jQuery 1.2.6
http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js
Firebug reports 17kb.

On my filesystem re-compressed with Packer 3 (var shrink) it's 15,142
bytes.
Firebug reports 16kb.

* * * * * *

I don't see the "trouble" in providing a minified version.
Every major js framework as had no trouble providing one.
The only trouble I see is in user/developer relations when potential
users
get the impression that the core devs just don't care enough to
provide one. (Even
when handed everything to accomplish it.)

In the readme_first.txt, included in the pack, I mention YUI
compressor is compatible with Prototype's use of the $super variable
and I
provide a customized Dean Edwards Packer 3 (with $super support as
well).
I also link to articles about mod_deflate and provide a
sample .htaccess setup for mod_deflate.

- JDD
Reply all
Reply to author
Forward
0 new messages