Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Minifiction and gzip are two different concepts.
- Minification minifies the content of a file by rewriting it (cant be undone).
- Gzip compresses the file without altering the content (unzipping restores the original file).
Minification is more effective in most cases where you have a human readable file as a source. The minification takes away some of the human readability without (in an ideal world) touching the readability for the machine.
But both concepts can (and should) be combined for optimizing filesize.
i think that Minify is the only thing that didn't got in D7.
Page Speed report (firefox):
Minify JavaScript
Minifying the following JavaScript resources using JSMin could reduce their size by 12.2KiB (13% reduction).
* Minifying http://.../files/js/js_m1OCm... could save 12.2KiB (13% reduction). See optimized version or Save as.
btw,
Minify CSS is in D7.
Minify HTML is not in D7.
Here are some features from the list. We dont need all of this, but its all optional as I understand it:
* Combines and minifies multiple CSS or JavaScript files into a single download
* Uses an enhanced port of Douglas Crockford's JSMin library and custom classes to minify CSS and HTML
* Caches server-side (files/apc/memcache) to avoid doing unnecessary work
* Responds with an HTTP 304 (Not Modified) response when the browser has an up-to-date cache copy
* Most modules are lazy-loaded as needed (304 responses use minimal code)
* Automatically rewrites relative URIs in combined CSS files to point to valid locations
* With caching enabled, Minify is capable of handling hundreds of requests per second on a moderately powerful server.
* Content-Encoding: gzip, based on request headers. Caching allows it so serve gzipped files faster than Apache's mod_deflate option!
* Test cases for most components
* Easy integration of 3rd-party minifiers
* Separate utility classes for HTTP encoding and cache control
Comments
Comment #1
lpalgarvio CreditAttribution: lpalgarvio commenteddid this get into D7 core?
css_gzip did ;)
http://www.unleashedmind.com/en/blog/sun/more-than-50-drupal-modules-mov...
Comment #2
dropbydrop CreditAttribution: dropbydrop commentedisn't minification produces smaller results than gzip? or am i wrong?
Comment #3
derjochenmeyer CreditAttribution: derjochenmeyer commentedMinifiction and gzip are two different concepts.
- Minification minifies the content of a file by rewriting it (cant be undone).
- Gzip compresses the file without altering the content (unzipping restores the original file).
Minification is more effective in most cases where you have a human readable file as a source. The minification takes away some of the human readability without (in an ideal world) touching the readability for the machine.
But both concepts can (and should) be combined for optimizing filesize.
Comment #4
dropbydrop CreditAttribution: dropbydrop commentedIs there any module right now for D7 that minifies js?
If not, is there anything in the horizon?
Comment #5
lpalgarvio CreditAttribution: lpalgarvio commentedi think that Minify is the only thing that didn't got in D7.
Page Speed report (firefox):
btw,
Minify CSS is in D7.
Minify HTML is not in D7.
Comment #6
derjochenmeyer CreditAttribution: derjochenmeyer commentedWhat about using "minify" for a D7 Version of Javascript Aggregator?
http://code.google.com/p/minify/
Here are some features from the list. We dont need all of this, but its all optional as I understand it:
Comment #7
Wim LeersSubscribing.
Comment #8
nwe_44 CreditAttribution: nwe_44 commentedsubscribing
Comment #9
mehtatejas CreditAttribution: mehtatejas commentedsubscribing
Comment #10
SeanBannister CreditAttribution: SeanBannister commentedsub
Comment #11
billmp123 CreditAttribution: billmp123 commentedsubscribing
Comment #12
TNmoxa CreditAttribution: TNmoxa commentedsubscribing
Comment #13
drupal a11y CreditAttribution: drupal a11y commentedSubscribe
Comment #14
bensnyder CreditAttribution: bensnyder commentedsubscribe
Comment #15
mikeytown2 CreditAttribution: mikeytown2 commentedOnce advagg hits 1.0 I'll be porting it over to 7.x and/or combining it with these 2 projects http://drupal.org/project/core_library http://drupal.org/project/agrcache
Comment #16
7wonders CreditAttribution: 7wonders commentedsub
Comment #17
pembertona CreditAttribution: pembertona commentedsubscribe
Comment #18
derMatze CreditAttribution: derMatze commentedsubscribe
Comment #19
Niklas Fiekas CreditAttribution: Niklas Fiekas commentedSubscribe.
Comment #20
dropbydrop CreditAttribution: dropbydrop commentedsubscribe
Comment #21
DonnyCarette CreditAttribution: DonnyCarette commentedSubscribe
Comment #22
Sol Roth CreditAttribution: Sol Roth commentedSubscribe
Comment #23
mraichelson CreditAttribution: mraichelson commentedsubscribe
Comment #24
lpalgarvio CreditAttribution: lpalgarvio commentedComment #25
Fidelix CreditAttribution: Fidelix commentedSubscribing...
Comment #26
threading_signals CreditAttribution: threading_signals commentedLooking forward to updates on this issue and #15. How long will this be postponed...?
Comment #27
Coupon Code Swap CreditAttribution: Coupon Code Swap commentedsubscribe
Comment #28
bryancasler CreditAttribution: bryancasler commentedsubscribe
Comment #29
mrfelton CreditAttribution: mrfelton commentedsubscribing
Comment #30
Jackinloadup CreditAttribution: Jackinloadup commentedsubscribe
Comment #31
Mafk CreditAttribution: Mafk commentedsubscribe
Comment #32
wellsys_world CreditAttribution: wellsys_world commentedSubscribe
Comment #33
Refineo CreditAttribution: Refineo commentedsubscribing
Comment #34
Refineo CreditAttribution: Refineo commentedadding d7 ports tag
Comment #35
threading_signals CreditAttribution: threading_signals commentedSince [[http://drupal.org/node/940342|issue 940342]] has been fixed, wondering when the port will take place. Thanks!
Comment #36
Jackinloadup CreditAttribution: Jackinloadup commented#35s issue #940342: Javascript Aggregator: Allowed memory size ... exhausted
for the lazy people
Comment #37
lpalgarvio CreditAttribution: lpalgarvio commentedwhats the status for 6.x?
still under development or do you advise users to switch to advagg?
and for 7.x?
will a release happen or similar modules will fill in the gap?
http://drupal.org/project/advagg - #1171546: AdvAgg - D7 Port/Re-write
http://drupal.org/project/core_library
http://drupal.org/project/agrcache
http://drupal.org/project/blackwhite
http://drupal.org/project/css_gzip was deprecated in favor of http://drupal.org/project/advagg