Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: TinyMCE Perl Compressor

by diotalevi (Canon)
on May 02, 2007 at 15:33 UTC ( [id://613185]=note: print w/replies, xml ) Need Help??


in reply to TinyMCE Perl Compressor

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.

⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

Replies are listed 'Best First'.
Re^2: TinyMCE Perl Compressor
by clinton (Priest) on May 03, 2007 at 16:57 UTC
    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".

      ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

Re^2: TinyMCE Perl Compressor
by clinton (Priest) on Jun 05, 2007 at 10:05 UTC
    Don't most web servers send compressed data anyway?

    You'd think so, but even our own Perl Monks doesn't gzip its responses:

    http://www.perlmonks.org/index.pl? GET /index.pl? HTTP/1.1 Host: www.perlmonks.org User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-GB; rv:1.8.1. +4) Gecko/20070529 SUSE/2.0.0.4-6.1 Firefox/2.0.0.4 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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2024-04-25 11:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found