Re: Bananascript javascript scruncher
Reply #1 –
Where's the code at? Just looks like a service.
Re: Bananascript javascript scruncher
Reply #2 –
Dunno where it's hiding. I know Arantor managed to reverse engineer it. Which he said was a bit of a mission. Could try asking him about it.
Or, you could just ask the dude who wrote it if he would be prepared to part with code for a good cause.
Re: Bananascript javascript scruncher
Reply #4 –
Never heard of it before ...
Certainly doing some form of compression wrapper, gzip or other. I'm probably wrong but I think that would mean the browser has to uncompressed the file each time its used? Or maybe it can uncompress it just once to the browser cache?
You save some amount of single time bandwidth (since the files are cached by the browser) at the expense of the computational overhead of uncompressing them. Not sure which would end up better, probably chasing gnat farts.
Re: Bananascript javascript scruncher
Reply #5 –
What the site does is basically: convert all the js to a text string, find some repeated patterns and replace them with placeholders, then wrap everything into some code that, client-side, does the "counter replacement" putting back the repeated patterns and ends with an equivalent of eval(string_of_code).
Re: Bananascript javascript scruncher
Reply #6 –
Yeah, what Ema said, AFAICT. Makes for very small files without gzipping.
Re: Bananascript javascript scruncher
Reply #7 –
So it does require the client to "unpack" the JS file before it can be used, and perhaps each time ... interesting concept, not sure about whats really better for the client, a few more bits or a bit more processing.
Re: Bananascript javascript scruncher
Reply #9 –
I think we're better off without having the client do decompression at the Javascript level.