Re:India Launches Beta Version of Its Data Site
by Zirro on Monday September 03, 2012 @05:10AM
(#4469699)
I don't think I've ever seen so many separate JavaScript and CSS-files used on a page before. Surely most, if not all, could be reduced into one?
[ Parent
| on HN ]
Re:India Launches Beta Version of Its Data Site
by aasarava on Monday September 03, 2012 @11:07PM
(#4472875)
In Drupal any module can inject its own separate stylesheet into the page. It's standard practice to enable Drupal's CSS (and javascript) compression feature once you move the site to production. That they haven't done it suggests the developers aren't very familiar with Drupal, or easily overlook details.
Re:India Launches Beta Version of Its Data Site
by ericgsmith on Monday September 03, 2012 @05:36AM
(#4469781)
Drupal 7 does this out of the box, with an option to aggregate and compress JS and CSS. I have not developed on Drupal 6 but would be incredibly surprised if there wasn't at least a community developed module to do this.
Re:India Launches Beta Version of Its Data Site
by gingerjoos on Monday September 03, 2012 @09:00AM
(#4470193)
If I remember correctly this has been available out of the box at least since Drupal 5 up. Have worked on Drupal 5 and 6, don't remember using any custom module to do aggregation.
Re:India Launches Beta Version of Its Data Site
by weego on Monday September 03, 2012 @05:12AM
(#4469708)
It's rarely beneficial to compress to one single file, but I completely agree that the way they are doing it it very inefficient, especially spamming the @import notation.
Re:India Launches Beta Version of Its Data Site
by raganesh on Monday September 03, 2012 @05:50AM
(#4469814)
Not sure what you mean by "rarely beneficial to compress to one single file".
But in multiple situations I have seen significant web load performance improvements when the number of discrete files being loaded is reduced - merge all JS into one file, all CSS into another and sprite images. This is due to HTTP 2-connection rule.
Re:India Launches Beta Version of Its Data Site
by SquareWheel on Monday September 03, 2012 @07:42AM
(#4470024)
And slow-start certainly contributes.