Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

TinyMCE Perl Compressor

by clinton (Priest)
on Apr 29, 2007 at 20:41 UTC ( #612673=sourcecode: print w/replies, xml ) Need Help??
Category: CGI / Web
Author/Contact Info Clinton Gormley
Description: TinyMCE is an open source cross browser rich text editor from Moxiecode. The TinyMCE Perl compressor gzips all javascript files in TinyMCE to a single streamable file. This makes the overall download size 75% smaller and the number of requests will also be reduced. The overall initialisation time for TinyMCE will be reduced dramatically if you use this script. The TinyMCE Perl compressor project page is at
The current release can always be downloaded from
Replies are listed 'Best First'.
Re: TinyMCE Perl Compressor - new version released
by clinton (Priest) on Mar 30, 2008 at 20:22 UTC
Re: TinyMCE Perl Compressor
by diotalevi (Canon) on May 02, 2007 at 15:33 UTC

    Don't most web servers send compressed data anyway? Whenever I request a .js file, its often served as a gzip. That's just automatic.

    ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

      Yes, most can do, but a lot of people don't (or don't know how to) set it up.

      The gzip'ing is just part of the benefit. The other part is that you reduce maybe 6+ separate requests into one, and that it adds an Expires: header which essentially means that people will never need to download the javascript more than once per session.

      I can't take any credit for the idea - I just took what existed in PHP and rewrote it for use on a Perl platform.

        start blasphemy

        Can you point me to the PHP you based it on, I've got a Drupal install that could use it.

        /end blasphemy

        Ah, I didn't also realize it combines multiple files together. I do that at work with a CPP-like program that understands declarations like ///#include "foo.js".

        ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

      Don't most web servers send compressed data anyway?

      You'd think so, but even our own Perl Monks doesn't gzip its responses: GET / HTTP/1.1 Host: User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-GB; rv:1.8.1. +4) Gecko/20070529 SUSE/ Firefox/ Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9 +,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: en-gb,en;q=0.7,es;q=0.3 Accept-Encoding: gzip,deflate Accept-Charset: UTF-8,* Keep-Alive: 300 Connection: keep-alive Cookie: userpass=XXXXXXXXXXXXXXXXXXXXXXXX HTTP/1.x 200 OK Date: Tue, 05 Jun 2007 10:02:51 GMT Server: Apache/1.3.37 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html; charset=ISO-8859-1

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: sourcecode [id://612673]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2023-02-04 18:26 GMT
Find Nodes?
    Voting Booth?
    I prefer not to run the latest version of Perl because:

    Results (31 votes). Check out past polls.