digitalmars.D - minifying the website
- Andrei Alexandrescu (11/11) May 31 2013 Hello,
- w0rp (7/18) May 31 2013 I recommend YUI Compressor. http://yui.github.io/yuicompressor/ I
- Andrei Alexandrescu (4/10) May 31 2013 Thanks. I'm a bit weary of adding Java as a requirement for building. Is...
- David Gileadi (4/5) May 31 2013 I keep seeing people use this phrase; shouldn't it be "wary"?
- Simen Kjaeraas (4/9) May 31 2013 Certainly he would be weary, too? :p
- John Colvin (3/8) May 31 2013 I always thought people using "weary" were making some sort of
- Andrei Alexandrescu (8/13) May 31 2013 500K hits:
- Steven Schveighoffer (6/16) May 31 2013 Actually, weary is not the correct term in this context at all, even if ...
- Nick Sabalausky (4/11) May 31 2013 No you don't.
- Andrei Alexandrescu (3/14) May 31 2013 When I'm right I don't.
- Nick Sabalausky (7/25) May 31 2013 Just to be clear (not sure if it came across or not), I was
- H. S. Teoh (9/30) May 31 2013 I love self-contradictory / self-referential jokes...
- Andrei Alexandrescu (4/8) May 31 2013 Not to mention Obama's one: "My job is to be President; your job is to
- Andrei Alexandrescu (3/28) May 31 2013 Thanks, hadn't gotten the joke!
- Zach the Mystic (2/10) May 31 2013 No it isn't.
- Russel Winder (13/24) Jun 01 2013 Is this a five minute argument, or the full half hour?
- Walter Bright (2/7) May 31 2013 Weawy? Why awe you wagging on Awndway?
- Tyro[17] (10/20) May 31 2013 Damn! Tweety... who let you out of your cage?
- Vladimir Panteleev (5/7) May 31 2013 I would add it as a separate make target, which is not needed for
- Aleksandar Ruzicic (12/26) May 31 2013 Well, some requirement must be added as I'm unaware of good
- Brad Anderson (6/17) May 31 2013 mod_pagespeed can do all this and more on the server
- Adam D. Ruppe (5/7) May 31 2013 Are these files gzipped? gzipping them will almost certainly give
- Andrei Alexandrescu (5/11) May 31 2013 I don't know if the server is configured to serve them gzipped. How do I...
- w0rp (5/7) May 31 2013 Browsers send Accept-Encoding headers to let the webserver know
- Adam D. Ruppe (30/33) May 31 2013 I'd just upload a file.html.gz (gzip file.html on your own
- Andrei Alexandrescu (7/14) May 31 2013 It downloaded the file with name file.html. When opened with an editor,
- Aleksandar Ruzicic (5/8) May 31 2013 Which hosting company do you guys use? Disabling .htaccess seems
- Nick Sabalausky (6/8) May 31 2013 Me, too. I run Nginx on my server these days. One of the things I like
- Aleksandar Ruzicic (4/16) May 31 2013 +1
- Nick Sabalausky (6/25) May 31 2013 Yea. The only downside I've heard people say about Nginx was that it
- bearophile (6/11) May 31 2013 Are those pages served gzipped?
- Brad Anderson (3/14) May 31 2013 Ran it on http://dlang.org/
- Andrei Alexandrescu (3/21) May 31 2013 Got similar results. Quite dramatic. So what should I tell our admin?
- Brad Anderson (7/15) May 31 2013 He would need to install mod_pagespeed:
- w0rp (4/4) May 31 2013 Also, unless I'm mistaken, the dlang.org files don't appear to be
- Mr. Anonymous (5/16) May 31 2013 It would be also great if you could remove that flashing after
- Andrei Alexandrescu (3/6) May 31 2013 Hyphenation.
- Wyatt (14/23) May 31 2013 I may be in the minority in this, but I would prefer if some of
- w0rp (4/18) May 31 2013 I actually second this. I block those scripts because they slow
- H. S. Teoh (22/38) May 31 2013 +1.
- Kapps (5/16) May 31 2013 The site currently isn't configured to serve gzip / deflate
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, AndreiI 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 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 5/31/13 10:26 AM, Andrei Alexandrescu wrote:... I'm a bit weary of ...I keep seeing people use this phrase; shouldn't it be "wary"? Not meaning to pick on you, Andrei; it's just that this time was the tipping point for the editor in me to kick in :)
May 31 2013
On 2013-05-31, 19:47, David Gileadi wrote:On 5/31/13 10:26 AM, Andrei Alexandrescu wrote:Certainly he would be weary, too? :p -- Simen... I'm a bit weary of ...I keep seeing people use this phrase; shouldn't it be "wary"? Not meaning to pick on you, Andrei; it's just that this time was the tipping point for the editor in me to kick in :)
May 31 2013
On Friday, 31 May 2013 at 17:47:18 UTC, David Gileadi wrote:On 5/31/13 10:26 AM, Andrei Alexandrescu wrote:I always thought people using "weary" were making some sort of joke I wasn't getting........ I'm a bit weary of ...I keep seeing people use this phrase; shouldn't it be "wary"? Not meaning to pick on you, Andrei; it's just that this time was the tipping point for the editor in me to kick in :)
May 31 2013
On 5/31/13 1:47 PM, David Gileadi wrote:On 5/31/13 10:26 AM, Andrei Alexandrescu wrote:500K hits: https://www.google.com/#safe=off&output=search&sclient=psy-ab&q=%22i%27ve+been+weary+of%22&oq=%22i%27ve+been+weary+of%22&gs_l=hp.3...1121.4371.0.4641.20.18.0.0.0.0.265.4023.0j1j17.18.0...0.0...1c.1.15.psy-ab.OCbo1VhH_1U&pbx=1&bav=on.2,or.r_cp.r_qf.&bvm=bv.47244034,d.bGE&fp=1c945b72c868c039&biw=1436&bih=813 4.33M hits: https://www.google.com/#safe=off&sclient=psy-ab&q=%22i%27ve+been+wary+of%22&oq=%22i%27ve+been+wary+of%22&gs_l=hp.3...5710.5710.1.5944.1.1.0.0.0.0.215.215.2-1.1.0...0.0...1c.1.15.psy-ab.q0Jhcs6ZPJ4&pbx=1&bav=on.2,or.r_cp.r_qf.&bvm=bv.47244034,d.bGE&fp=1c945b72c868c039&biw=1436&bih=813 Guess you're right!... I'm a bit weary of ...I keep seeing people use this phrase; shouldn't it be "wary"?Not meaning to pick on you, Andrei; it's just that this time was the tipping point for the editor in me to kick in :)On the contrary I love being corrected. Andrei
May 31 2013
On Fri, 31 May 2013 15:43:51 -0400, Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> wrote:On 5/31/13 1:47 PM, David Gileadi wrote:Actually, weary is not the correct term in this context at all, even if it doesn't win a google popularity contest ;) http://grammarstars.blogspot.com/2007/11/wearyleerywary-query.html -SteveOn 5/31/13 10:26 AM, Andrei Alexandrescu wrote:500K hits: https://www.google.com/#safe=off&output=search&sclient=psy-ab&q=%22i%27ve+been+weary+of%22&oq=%22i%27ve+been+weary+of%22&gs_l=hp.3...1121.4371.0.4641.20.18.0.0.0.0.265.4023.0j1j17.18.0...0.0...1c.1.15.psy-ab.OCbo1VhH_1U&pbx=1&bav=on.2,or.r_cp.r_qf.&bvm=bv.47244034,d.bGE&fp=1c945b72c868c039&biw=1436&bih=813 4.33M hits: https://www.google.com/#safe=off&sclient=psy-ab&q=%22i%27ve+been+wary+of%22&oq=%22i%27ve+been+wary+of%22&gs_l=hp.3...5710.5710.1.5944.1.1.0.0.0.0.215.215.2-1.1.0...0.0...1c.1.15.psy-ab.q0Jhcs6ZPJ4&pbx=1&bav=on.2,or.r_cp.r_qf.&bvm=bv.47244034,d.bGE&fp=1c945b72c868c039&biw=1436&bih=813 Guess you're right!... I'm a bit weary of ...I keep seeing people use this phrase; shouldn't it be "wary"?
May 31 2013
On Fri, 31 May 2013 15:43:51 -0400 Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> wrote:On 5/31/13 1:47 PM, David Gileadi wrote:No you don't. (Couldn't resist ;) )Not meaning to pick on you, Andrei; it's just that this time was the tipping point for the editor in me to kick in :)On the contrary I love being corrected.
May 31 2013
On 5/31/13 4:50 PM, Nick Sabalausky wrote:On Fri, 31 May 2013 15:43:51 -0400 Andrei Alexandrescu<SeeWebsiteForEmail erdani.org> wrote:When I'm right I don't. AndreiOn 5/31/13 1:47 PM, David Gileadi wrote:No you don't. (Couldn't resist ;) )Not meaning to pick on you, Andrei; it's just that this time was the tipping point for the editor in me to kick in :)On the contrary I love being corrected.
May 31 2013
On Fri, 31 May 2013 17:24:38 -0400 Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> wrote:On 5/31/13 4:50 PM, Nick Sabalausky wrote:Just to be clear (not sure if it came across or not), I was [attempting to] make a joke about "Ahh, you love being corrected? Well then I'll be nice and correct you now! Enjoy, and you're welcome!" Really it's more contradiction than correction, but that's getting into argument clinic territory...On Fri, 31 May 2013 15:43:51 -0400 Andrei Alexandrescu<SeeWebsiteForEmail erdani.org> wrote:When I'm right I don't.On 5/31/13 1:47 PM, David Gileadi wrote:No you don't. (Couldn't resist ;) )Not meaning to pick on you, Andrei; it's just that this time was the tipping point for the editor in me to kick in :)On the contrary I love being corrected.
May 31 2013
On Fri, May 31, 2013 at 05:35:43PM -0400, Nick Sabalausky wrote:On Fri, 31 May 2013 17:24:38 -0400 Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> wrote:[...]On 5/31/13 4:50 PM, Nick Sabalausky wrote:On Fri, 31 May 2013 15:43:51 -0400 Andrei Alexandrescu<SeeWebsiteForEmail erdani.org> wrote:I love self-contradictory / self-referential jokes... People say I'm indecisive, but I'm not sure about that. -- YHL, CONLANG People tell me that I'm skeptical, but I don't believe it. T -- People tell me that I'm paranoid, but they're just out to get me.Just to be clear (not sure if it came across or not), I was [attempting to] make a joke about "Ahh, you love being corrected? Well then I'll be nice and correct you now! Enjoy, and you're welcome!" Really it's more contradiction than correction, but that's getting into argument clinic territory...When I'm right I don't.On the contrary I love being corrected.No you don't. (Couldn't resist ;) )
May 31 2013
On 5/31/13 6:53 PM, H. S. Teoh wrote:I love self-contradictory / self-referential jokes... People say I'm indecisive, but I'm not sure about that. -- YHL, CONLANG People tell me that I'm skeptical, but I don't believe it.Not to mention Obama's one: "My job is to be President; your job is to keep me humble. Frankly, I think I'm doing my job better." Andrei
May 31 2013
On 5/31/13 5:35 PM, Nick Sabalausky wrote:On Fri, 31 May 2013 17:24:38 -0400 Andrei Alexandrescu<SeeWebsiteForEmail erdani.org> wrote:Thanks, hadn't gotten the joke! AndreiOn 5/31/13 4:50 PM, Nick Sabalausky wrote:Just to be clear (not sure if it came across or not), I was [attempting to] make a joke about "Ahh, you love being corrected? Well then I'll be nice and correct you now! Enjoy, and you're welcome!" Really it's more contradiction than correction, but that's getting into argument clinic territory...On Fri, 31 May 2013 15:43:51 -0400 Andrei Alexandrescu<SeeWebsiteForEmail erdani.org> wrote:When I'm right I don't.On 5/31/13 1:47 PM, David Gileadi wrote:No you don't. (Couldn't resist ;) )Not meaning to pick on you, Andrei; it's just that this time was the tipping point for the editor in me to kick in :)On the contrary I love being corrected.
May 31 2013
On Friday, 31 May 2013 at 21:35:46 UTC, Nick Sabalausky wrote:Just to be clear (not sure if it came across or not), I was [attempting to] make a joke about "Ahh, you love being corrected? Well then I'll be nice and correct you now! Enjoy, and you're welcome!" Really it's more contradiction than correction, but that's getting into argument clinic territory...No it isn't.
May 31 2013
On Sat, 2013-06-01 at 05:34 +0200, Zach the Mystic wrote:On Friday, 31 May 2013 at 21:35:46 UTC, Nick Sabalausky wrote:Is this a five minute argument, or the full half hour? http://www.montypython.net/scripts/argument.php --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winderJust to be clear (not sure if it came across or not), I was [attempting to] make a joke about "Ahh, you love being=20 corrected? Well then I'll be nice and correct you now! Enjoy, and you're=20 welcome!" Really it's more contradiction than correction, but that's=20 getting into argument clinic territory...=20 No it isn't.
Jun 01 2013
On 5/31/2013 10:47 AM, David Gileadi wrote:On 5/31/13 10:26 AM, Andrei Alexandrescu wrote:Weawy? Why awe you wagging on Awndway?... I'm a bit weary of ...I keep seeing people use this phrase; shouldn't it be "wary"? Not meaning to pick on you, Andrei; it's just that this time was the tipping point for the editor in me to kick in :)
May 31 2013
On 5/31/13 4:42 PM, Walter Bright wrote:On 5/31/2013 10:47 AM, David Gileadi wrote:Damn! Tweety... who let you out of your cage? -- Andrew Edwards -------------------- http://www.akeron.co auto getAddress() { string location = " ", period = "."; return ("info" ~ location ~ "afidem" ~ period ~ "org"); }On 5/31/13 10:26 AM, Andrei Alexandrescu wrote:Weawy? Why awe you wagging on Awndway?... I'm a bit weary of ...I keep seeing people use this phrase; shouldn't it be "wary"? Not meaning to pick on you, Andrei; it's just that this time was the tipping point for the editor in me to kick in :)
May 31 2013
On Friday, 31 May 2013 at 17:26:16 UTC, Andrei Alexandrescu wrote:Thanks. I'm a bit weary of adding Java as a requirement for building. Is that a legitimate concern?I would add it as a separate make target, which is not needed for building the website, but is ran before uploading it to dlang.org. This way, website contributors won't need Java just to test their changes.
May 31 2013
On Friday, 31 May 2013 at 17:26:16 UTC, Andrei Alexandrescu wrote:On 5/31/13 1:17 PM, w0rp wrote:Well, some requirement must be added as I'm unaware of good minifiers that do not require a runtime. But I would always go with Node.js instead of Java. IMHO these days to be serious web developer you must have Node.js installed, as NPM modules have become de facto standard for distributing libraries and utilities for web development. For Node.js minifiers I recommend uglify.js (https://github.com/mishoo/UglifyJS2) for JavaScript and clean-css (https://github.com/GoalSmashers/clean-css) for CSS. And for server configuration take a look at https://github.com/h5bp/server-configsI 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: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, Andreimod_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
On 5/31/13 1:19 PM, Adam D. Ruppe wrote:On Friday, 31 May 2013 at 17:12:11 UTC, Andrei Alexandrescu wrote: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? AndreiThere 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
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? AndreiBrowsers 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:23:49 UTC, Andrei Alexandrescu wrote:I don't know if the server is configured to serve them gzipped. How do I figure that out?I'd just upload a file.html.gz (gzip file.html on your own computer) and then try to go to dlang.org/file.html It might just work. If that doesn't, rename file.html.gz to file.html and again try it, if it just works, add gzip to your build process then upload. If it doesn't just work, and .htaccess is enabled, try adding this to your .htaccess file and then try again: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTP:Accept-encoding} gzip RewriteCond %{HTTP_USER_AGENT} !Safari RewriteCond %{REQUEST_FILENAME}.gz -f RewriteRule ^(*.html)$ $1.gz [QSA,L] <FilesMatch \.html\.gz$> ForceType text/html Header append Vary Accept-Encoding </FilesMatch> </IfModule> <IfModule mod_mime.c> AddEncoding gzip .gz </IfModule> that just does html, the regexs will need matching for js and css too, but that should work. I use this on one of my computers to serve up file.html.gz as file.html transparently. BTW I suck at apache config and hate doing it (this is why my cgi.d has a gzip flag among others - easier to do in D than httpd.conf!) so if someone has a better way please overrule me.Can we count on all modern browsers to ask for gzipped content?Yeah, and if not the server will most likely unzip it for you as needed.
May 31 2013
On 5/31/13 1:50 PM, Adam D. Ruppe wrote:I'd just upload a file.html.gz (gzip file.html on your own computer) and then try to go to dlang.org/file.htmlIt downloaded the file with name file.html. When opened with an editor, it showed the garbled compressed content.It might just work. If that doesn't, rename file.html.gz to file.html and again try it, if it just works, add gzip to your build process then upload.This displays the same garbled compressed content straight in the browser.If it doesn't just work, and .htaccess is enabled, try adding this to your .htaccess file and then try again:[snip] Tried, broke the directory. I recall our admin has disabled .htaccess. Andrei
May 31 2013
On Friday, 31 May 2013 at 19:51:29 UTC, Andrei Alexandrescu wrote:Tried, broke the directory. I recall our admin has disabled .htaccess. AndreiWhich hosting company do you guys use? Disabling .htaccess seems too unprofessional.. Anyway, I was under impression that dlang.org is hosted from some dedicated server.
May 31 2013
On Fri, 31 May 2013 19:50:06 +0200 "Adam D. Ruppe" <destructionator gmail.com> wrote:BTW I suck at apache config and hate doing itMe, too. I run Nginx on my server these days. One of the things I like about it is that its configuration is so much easier to deal with. It still isn't trivial, and I still have to think about what I'm doing, but it's not nearly as painful (for me, anyway) as Apache configuration.
May 31 2013
On Friday, 31 May 2013 at 21:00:05 UTC, Nick Sabalausky wrote:On Fri, 31 May 2013 19:50:06 +0200 "Adam D. Ruppe" <destructionator gmail.com> wrote:+1 Couldn't agree more. I've switched to nginx few years back and haven't regretted it a bit.BTW I suck at apache config and hate doing itMe, too. I run Nginx on my server these days. One of the things I like about it is that its configuration is so much easier to deal with. It still isn't trivial, and I still have to think about what I'm doing, but it's not nearly as painful (for me, anyway) as Apache configuration.
May 31 2013
On Fri, 31 May 2013 23:05:20 +0200 "Aleksandar Ruzicic" <aleksandar ruzicic.info> wrote:On Friday, 31 May 2013 at 21:00:05 UTC, Nick Sabalausky wrote:Yea. The only downside I've heard people say about Nginx was that it was supposedly much lighter on features than Apache, but honestly, I don't see that at all. It seems to have all the bells & whistles I can think of ever needing.On Fri, 31 May 2013 19:50:06 +0200 "Adam D. Ruppe" <destructionator gmail.com> wrote:+1 Couldn't agree more. I've switched to nginx few years back and haven't regretted it a bit.BTW I suck at apache config and hate doing itMe, too. I run Nginx on my server these days. One of the things I like about it is that its configuration is so much easier to deal with. It still isn't trivial, and I still have to think about what I'm doing, but it's not nearly as painful (for me, anyway) as Apache configuration.
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 Friday, 31 May 2013 at 17:20:14 UTC, bearophile wrote:Andrei Alexandrescu:Ran it on http://dlang.org/ http://www.webpagetest.org/result/130531_FM_d41bcc90232a08ecab128ed395047e63/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:28 PM, Brad Anderson wrote:On Friday, 31 May 2013 at 17:20:14 UTC, bearophile wrote:Got similar results. Quite dramatic. So what should I tell our admin? AndreiAndrei Alexandrescu:Ran it on http://dlang.org/ http://www.webpagetest.org/result/130531_FM_d41bcc90232a08ecab128ed395047e63/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 Friday, 31 May 2013 at 17:33:15 UTC, Andrei Alexandrescu wrote:On 5/31/13 1:28 PM, Brad Anderson wrote:He would need to install mod_pagespeed: https://developers.google.com/speed/pagespeed/module/download Do some typical Apache configuration (enabling the module for the Virtual Host and whatnot): https://developers.google.com/speed/pagespeed/module/configuration Just using the default CoreFilters is probably fine.Ran it on http://dlang.org/ http://www.webpagetest.org/result/130531_FM_d41bcc90232a08ecab128ed395047e63/Got similar results. Quite dramatic. So what should I tell our admin? 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 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, AndreiIt would be also great if you could remove that flashing after the page is loaded. I believe it's caused by the bodyLoad() function. Why is it even needed?
May 31 2013
On 5/31/13 1:33 PM, Mr. Anonymous wrote:It would be also great if you could remove that flashing after the page is loaded. I believe it's caused by the bodyLoad() function. Why is it even needed?Hyphenation. 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.I may be in the minority in this, but I would prefer if some of that were just removed entirely. In particular, the code-running doohickey that doesn't even work needs to die for the pathological behaviour it gives on Firefox. For example http://dlang.org/phobos/std_algorithm.html hung my browser for almost twenty seconds with a blank coloured background. This is on an i5 at work and my i7 at home, with or without extensions. I can't even imagine how my old laptop would cope. To add insult to injury, it displayed the page without the JS for almost a second before disappearing. I'm fine with some light JS that makes the documentation more usable or useful; this makes it practically unusable unless I have access to NoScript.
May 31 2013
On Friday, 31 May 2013 at 17:43:09 UTC, Wyatt wrote:I may be in the minority in this, but I would prefer if some of that were just removed entirely. In particular, the code-running doohickey that doesn't even work needs to die for the pathological behaviour it gives on Firefox. For example http://dlang.org/phobos/std_algorithm.html hung my browser for almost twenty seconds with a blank coloured background. This is on an i5 at work and my i7 at home, with or without extensions. I can't even imagine how my old laptop would cope. To add insult to injury, it displayed the page without the JS for almost a second before disappearing. I'm fine with some light JS that makes the documentation more usable or useful; this makes it practically unusable unless I have access to NoScript.I actually second this. I block those scripts because they slow the pages down massively, and often break. I'm using Firefox on Windows with a beefy i7.
May 31 2013
On Fri, May 31, 2013 at 07:43:08PM +0200, Wyatt wrote:On Friday, 31 May 2013 at 17:12:11 UTC, Andrei Alexandrescu wrote:[...]+1. I browse dlang.org with JS turned off because it's much more usable that way. I've no idea what the JS does (the only visible effect I can see is the ugly blob of unreadable links in the Phobos docs which are useless anyway -- the links, I mean, not the docs), but it makes page contents vanish for a good number of seconds, causes my browser to soak up memory like a sponge, and results in poor performance in general. We should either fix whatever is causing the performance hit, or just get rid of it altogether. [...]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.I may be in the minority in this, but I would prefer if some of that were just removed entirely.I'm fine with some light JS that makes the documentation more usable or useful; this makes it practically unusable unless I have access to NoScript.Due to several sites that recently insisted on adding heavy-duty JS that doesn't add any significant functionality, I've turned off JS by default and only enable it on a site-by-site need-to basis (I use Opera that has per-site preferences built-in). The web is surprisingly faster and easier to use that way. (Most people will probably think I'm nuts, though. And they're probably right. :-P *shrug*) T -- In order to understand recursion you must first understand recursion.
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, AndreiThe site currently isn't configured to serve gzip / deflate compressed content. Fixing this will lower bandwidth usage in a much more significant way than serving minified files would. I think mod_deflate is used for this in Apache.
May 31 2013