Thursday, May 24th, 2007
ProtoPacked 2.13: Protoype + Script.aculo.us == 32kb
<>p>John-David Dalton is up to his packing tricks again, and has created ProtoPacked 2.13:This updated pack includes compressed versions of Prototype: 1.4, 1.5,
1.5.1 and Scriptaculous: 1.7.1_beta2.There is also a “Protoculous” option as well (Prototype and
Scriptaculous combined)Smallest files are:
Prototype 1.5.1 @ 15.8kb
Scriptaculous-1.7.1_beta2 @ 17.9kb
Protoculous (1.5.1 + 1.7.1_beta2) @ 32.5kb
Download from here and find protopacked_v2.13.zip.
Related Content:











awesome news. but the file is incomplete i think it gives error when i trying to extract it. you know, “unexpected end of archive”
here is the working one; http://www.wikeo.be/files/951/protoculous-1.0.1.zip
thank you google!
@ilkin – The Google Groups pages have been acting wierd the last couple of days. I just tried the download/extract and it worked fine for me 8).
Try again in 15 min or so and see if that helps.
@ilkin – The package from wikieo.be was not made by me, but by “Thomas”. His package only includes the Prototype + Scriptaculous combo and does not include gzipped versions. We also went about compressing them in different ways. He used ShrinkSafe on Scriptaculous and used a pre-formatted Prototype. Because the encodings were not consistent his compression suffered some. He also relied on High ASCII JavaScript compression which has been known to causes issues for the newest Safari/OmniWeb.
I recommend staying with this source:
http://groups.google.com/group/prototype-core/files
Great work as always JD. Some day I’ll have to twist your arm about your compression routines! ;)
@Rey – Thanks 8). You need only look to Dean Edwards. His Packer is all I use. ( No twisting required 8P )
With this version of prototype + scriptaculous, we can’t load just a “part” of scriptaculous? like just the “effect” module for example.
Am I right?
@JD: I took the latest PT 1.5.1 and packed it with Dean’s Packer and my results are different from yours. Can you buzz me off post so I can give you what I see and we can compare notes? reybango (at} gmail
@Nicolas – You are correct 8). I choose to pack all the Scriptaculous components. I will most likely (when time permits) produce a pack for the different components of Scriptaculous.
The good news is I gave you the tools to do so in the package. The tool I used to format Scriptaculous is under the “tools†folder.
1) The tool is an HTML file so edit the source and replace the appropriate code block with the component you want formatted.
2) Past the Prototype 1.5.1 (formatted code) and the Output from the tool into Dean Edwards’ packer.
3) Pack and enjoy your Custom “Protoculous”.
@Rey – Before packing them I did have to format the code (add missing semi-colons and fix some troublesome regexp that most compressors don’t like).
I have been using the tip from here
http://rakaz.nl/item/make_your_pages_load_faster_by_combining_and_compressing_javascript_and_css_files
I dont bother with the mod rewrite stuff, and just pass my files along to the combine.php file directly… Makes prototype, Scriptaculous and my own scripts.js file combined into one file at 32k.
Also this way, I can me making changes to my scripts.js file while building and still get the advantage of compression.
@Alex – What version of Prototype/Scriptaculous are you using? 32kb for those plus your own code tells me its probably not 1.5.1+1.7.1_beta2.
I actually use a similar method in my own projects. http://www.pradosoft.com/demos/quickstart/?page=Advanced.Scripts3
It would be great if the Prototype guys would add a few semicolons so we could pack Prototype more easily! Just a thought…
@Michael Jackson – In their defense they write valid code, it’s not up to them to support every JavaScript compressor out there. I would like them to at least throw in the missing semi-colons, but they have their reasons and I respect that. For now you can use the ‘pre-formatted’ Prototype versions included in the package. This package has Original, Formatted, Compressed/Gzipped forms for every supported version.
Ooh very nice.
it’s Prototype, not Protoype
jdalton – I stand corrected it is 51.7k for the full prototype and Scriptaculous when using the combine.php file to serve them up. I want using everything in Scriptaculous..
(Scriptaculous 1.7.1 b2 + prototype 1.5.1 final)
Looks to be about on par with this method for final size, but adds the flexibility to be able to read the code and edit it at will on top of being able to add what ever other files I create myself.. Plus it also compresses CSS!
This article says that the file “protoculous-1.0.1.js” is 32.5kb, but looking at the file after downloading it and it is 56k…
opps.. spelling..
Should have been “I WASN’T using everything in Scriptaculous..”
Nice, Thanks!
For thos fo you reading WIRED i’ve thought of a new Jargon watch buzzword that we could create after reading a comment above:
IT’S PROTOHYPE not PROTOTYPE :) love it…
@Alex – As I mentioned in an earlier post the package that the other commenter, Ilkin pointed to, was not made by me. Look at my previous comments for clarification. I also mentioned that I use a similar method to yours in my own projects. Re-reading my comments may help.
I am not saying that my package should replace what you have. What you have works for you. This package is to help those who are looking for a quick way to get formatted and compressed forms of Prototype and Scriptaculous.
Developers can do whatever they want with the formatted, var-strunk, packed, and gzipped forms that my package offers. For example, if you use the var-shrunk version of Prototype in your setup it would give you a smaller gzipped file, thus lessening the over-all footprint.
ProtoPacked can be found only at:
http://groups.google.com/group/prototype-core/files
The smallest file size of the (Prototype/Scriptaculous combo) is correct @ 32.5kb.
Use this tool to compress your js/css files correctly.
http://scott.carnett.name/downloads/jCompressor.zip
(uses Dean Edwards Packer and Mozilla Rhino).
I know its an old argument and people love to compress their javascript … but a simple jsmin and gzip compression can compress normal code (code that’s readable and not written using one-char variablenames) with ~85% and you don’t have the problem that the heavy use of eval()/regexp during unpacking freezes older browsers.
And missing semicolons are not really valid code, to write warning-free give jslint a try or enable at least warnings in your firebug. Most people will never pay attention to it, but I feel better without warnings :D
Too bad, scriptaculous 1.7.1 b3 is out :p
digitarald – Following jslint can result in much pulling of hair, because many of jslints warnings are invalid or false. Prototypes code is valid without the missing semi-colons.
The script deployment method I use in my own projects utilizes something similar to jsmin and gzip compression too (http://www.pradosoft.com/demos/quickstart/?page=Advanced.Scripts3).
The ProtoPack package also includes gzipped versions of each release.
@ Scott – I use Firefox to format Scriptaculous and Deans packer as well 8). The formatted versions included in ProtoPack will work with many different compressors including ShrinkSafe and Dean’s Packer.
Updated v2.14:
Added support for Scriptaculous 1.7.1_beta3.
Added more links to info on JavaScript concatenation and compression.
To download go to:http://groups.google.com/group/prototype-core/files
Click on “protopacked_v2.14.zip”
Please read the “readme first.txt” for all the information on this package.
If I just want to optimize the number of hit on my serveur but not compression : I only use protoculous-shrinkvars.js (@ 133Ko).
Is that correct ?
Thank you
Righteous!
Why can’t I find any minified version of Script.aculo.us 1.8.2, which has been released back in Nov. 2008 ?
@magnosis and everyone that need up-to-date prototype and scriptaculous compressed, I made a last update to Protoculous.
You can grab the 2.0 release at http://protoculous.wikeo.be/
Hope this will help someone ;-)