Jump to page: 1 25  
Page
Thread overview
minifying the website
May 31, 2013
w0rp
OT: weary vs wary
May 31, 2013
David Gileadi
May 31, 2013
Simen Kjaeraas
May 31, 2013
John Colvin
May 31, 2013
Nick Sabalausky
May 31, 2013
Nick Sabalausky
May 31, 2013
H. S. Teoh
Jun 01, 2013
Zach the Mystic
Jun 01, 2013
Russel Winder
May 31, 2013
Walter Bright
Jun 01, 2013
Tyro[17]
May 31, 2013
Vladimir Panteleev
May 31, 2013
Aleksandar Ruzicic
May 31, 2013
Brad Anderson
May 31, 2013
Adam D. Ruppe
May 31, 2013
w0rp
May 31, 2013
Adam D. Ruppe
May 31, 2013
Aleksandar Ruzicic
May 31, 2013
Nick Sabalausky
May 31, 2013
Aleksandar Ruzicic
May 31, 2013
Nick Sabalausky
May 31, 2013
bearophile
May 31, 2013
Brad Anderson
May 31, 2013
Brad Anderson
May 31, 2013
w0rp
May 31, 2013
Mr. Anonymous
May 31, 2013
Wyatt
May 31, 2013
w0rp
May 31, 2013
H. S. Teoh
May 31, 2013
Kapps
May 31, 2013
Hello,


I've been looking through the logs and it looks like the top files in bytes transferred yesterday (even with the deluge of downloads) were a number of Javascript, HTML, and CSS files.

There are programs to reduce the size of such files called "minifiers". Should we use some? If so, what would the experts recommend? We'd need ideally some command line utility that we can deploy easily and integrate with the build process. Alternatively, an online service could fit the bill, too.


Thanks for your insights,

Andrei
May 31, 2013
On Friday, 31 May 2013 at 17:12:11 UTC, Andrei Alexandrescu wrote:
> Hello,
>
>
> I've been looking through the logs and it looks like the top files in bytes transferred yesterday (even with the deluge of downloads) were a number of Javascript, HTML, and CSS files.
>
> There are programs to reduce the size of such files called "minifiers". Should we use some? If so, what would the experts recommend? We'd need ideally some command line utility that we can deploy easily and integrate with the build process. Alternatively, an online service could fit the bill, too.
>
>
> Thanks for your insights,
>
> Andrei

I recommend YUI Compressor. http://yui.github.io/yuicompressor/ I use it for compressing JavaScript and CSS at my job, and it works very well. (It's also part of a Maven build script at my job, which is also cool.) If you use it, I recommend --nomunge --preserve-semi --disable-optimizations so it doesn't do any JavaScript fiddling beyond just minification.
May 31, 2013
On Friday, 31 May 2013 at 17:12:11 UTC, Andrei Alexandrescu wrote:
> Hello,
>
>
> I've been looking through the logs and it looks like the top files in bytes transferred yesterday (even with the deluge of downloads) were a number of Javascript, HTML, and CSS files.
>
> There are programs to reduce the size of such files called "minifiers". Should we use some? If so, what would the experts recommend? We'd need ideally some command line utility that we can deploy easily and integrate with the build process. Alternatively, an online service could fit the bill, too.
>
>
> Thanks for your insights,
>
> Andrei

mod_pagespeed can do all this and more on the server automatically.

https://developers.google.com/speed/pagespeed/mod

The filters it can apply: https://developers.google.com/speed/pagespeed/module/config_filters
May 31, 2013
On Friday, 31 May 2013 at 17:12:11 UTC, Andrei Alexandrescu wrote:
> There are programs to reduce the size of such files called "minifiers".

Are these files gzipped? gzipping them will almost certainly give a much bigger effect than any minifier and is trivially easy (in fact, it might be as simple as just gzipping the static file, and letting apache serve them straight up that way)
May 31, 2013
Andrei Alexandrescu:

> There are programs to reduce the size of such files called "minifiers". Should we use some? If so, what would the experts recommend? We'd need ideally some command line utility that we can deploy easily and integrate with the build process. Alternatively, an online service could fit the bill, too.

Are those pages served gzipped?

There is also this to test:
https://developers.google.com/speed/pagespeed/service/tryit

Bye,
bearophile
May 31, 2013
On 5/31/13 1:19 PM, Adam D. Ruppe wrote:
> On Friday, 31 May 2013 at 17:12:11 UTC, Andrei Alexandrescu wrote:
>> There are programs to reduce the size of such files called "minifiers".
>
> Are these files gzipped? gzipping them will almost certainly give a much
> bigger effect than any minifier and is trivially easy (in fact, it might
> be as simple as just gzipping the static file, and letting apache serve
> them straight up that way)

I don't know if the server is configured to serve them gzipped. How do I figure that out?

Can we count on all modern browsers to ask for gzipped content?


Andrei
May 31, 2013
Also, unless I'm mistaken, the dlang.org files don't appear to be gzipped. (Content-Encoding: gzip) Using gzip should massively reduce network IO. gzip works very well on HTML, JavaScript, JSON, and CSS, as there are a lot of redundant words used.
May 31, 2013
On 5/31/13 1:17 PM, w0rp wrote:
> I recommend YUI Compressor. http://yui.github.io/yuicompressor/ I use it
> for compressing JavaScript and CSS at my job, and it works very well.
> (It's also part of a Maven build script at my job, which is also cool.)
> If you use it, I recommend --nomunge --preserve-semi
> --disable-optimizations so it doesn't do any JavaScript fiddling beyond
> just minification.

Thanks. I'm a bit weary of adding Java as a requirement for building. Is that a legitimate concern?

Andrei
May 31, 2013
On Friday, 31 May 2013 at 17:23:49 UTC, Andrei Alexandrescu wrote:
> Can we count on all modern browsers to ask for gzipped content?
>
>
> Andrei

Browsers send Accept-Encoding headers to let the webserver know if gzip is viable, and webservers send gzip if they can, supposing they are configured to use gzip. All modern browsers should send the right headers, old ones will have fallbacks.
May 31, 2013
On Friday, 31 May 2013 at 17:20:14 UTC, bearophile wrote:
> Andrei Alexandrescu:
>
>> There are programs to reduce the size of such files called "minifiers". Should we use some? If so, what would the experts recommend? We'd need ideally some command line utility that we can deploy easily and integrate with the build process. Alternatively, an online service could fit the bill, too.
>
> Are those pages served gzipped?
>
> There is also this to test:
> https://developers.google.com/speed/pagespeed/service/tryit
>
> Bye,
> bearophile

Ran it on http://dlang.org/

http://www.webpagetest.org/result/130531_FM_d41bcc90232a08ecab128ed395047e63/
« First   ‹ Prev
1 2 3 4 5