Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Javascript/CSS on the fly

by McDarren (Abbot)
on Dec 04, 2005 at 12:42 UTC ( [id://513941]=note: print w/replies, xml ) Need Help??


in reply to Javascript/CSS on the fly

This is not directly related to your question, but it may help nevertheless.

If you're serving a lot of dynamic content from an Apache server, then you might want to check out the mod_deflate module. I only became aware of this module the other day (it was suggested by a cow-worker).

This is what happened after I implemented it on one of our servers - which serves almost exclusively dynamic content (look at the big drop in outgoing bandwidth at midnight on Friday night).

Cheers,
Darren :)

Replies are listed 'Best First'.
Re^2: Javascript/CSS on the fly
by cees (Curate) on Dec 04, 2005 at 13:38 UTC

    Unfortunately, it is generally recommended that you do not compress js or css files, since there are browsers out there that do not support it properly (1). They support compressed text/html content, but sometimes mess up with any other text based content that is compressed.

    But using mod_deflate (or mod_gzip for Apache 1.3) is definately something that most admins should be looking at.

    (1) http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B327286

      That's only an issue if it isn't inlined. And if it isn't inlined you can allow for caching better by providing some parameter in the URI to tie it to the page or set of pages it was generated for /applies to.

      --
      In Bob We Trust, All Others Bring Data.

        I recently wrote a mod_perl output filter which sits inside Apache. It intercepts requests for .css files and then "compresses" them on the fly before sending. It's not gzip compression, what it does is strip whitespace, comments, newlines etc. Check it out here: Compressing CSS on the fly

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-12-07 23:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which IDE have you been most impressed by?













    Results (50 votes). Check out past polls.