Combine external javascript wordpress plugin

New Page

icon-256x256

To download

Merge + Minimize + Refresh

Interactive PorLanzamiento

  • Details
  • Resenas
  • Facility
  • Apoyo
  • Desarrollo

Description

This add-on merge/concatena hojas cascading style and Javascript archives in groups. Luego, minimiza los archives generados usando Minify (para CSS) and Google Closure (para JS, recurre a Minify cuando no is available). The minificación is realized through WP-Cron so that no slowice el site web. Cuando JS ou CSS cambia, los archivos se vuelven a procesar. ¡No es necesario vaciar la memoria cache!

MinQueue and Dependency Minification inspiration and complements.

Reduction by Minify and Google Closure

To guarantee fast cargo times, it is recommended to establecer fechas de caducidad largas para CSS y JS, así como ensure that gzip or deflate isén activados.

Version 1.10 added the should_mmr filter that allows desarrolladores deshabilitar MMR whenever necessary. Use it to disable MMR for certain WordPress roles or with other page builders. He created three new add-ins that he uses: Merge + Minify + Refresh Check DIVI, Merge + Minify + Refresh Check Visual Composer, and Merge + Minify + Refresh Check Beaver Builder. Instálelos cuando sea necesario.

Version 1.6 has been supported for HTTP2 Server Push to speed up our solicitations even more (thanks to Daniel Aleksandersen).

Version 1.6.9 contains the hidden directory specific capability. Configure the MMR_CACHE_DIR and MMR_CACHE_URL constants in wp-config.php. MMR_CACHE_DIR must be the complete route of the server and MMR_CACHE_URL must be the URL absolutely so that it works correctly (thanks to Daniel Aleksandersen).

Version 1.6.11 added ability to specify separate hidden URL for javascript and CSS. Use MMR_JS_CACHE_URL and MMR_CSS_CACHE_URL to replace MMR_CACHE_URL.

Version 1.7.0 contains the capability for general .css.gz and .js.gz archives. It is possible that your deba web server is configured to use these archives. Aquí explains himself as usar estos archivos in Apache:

#Serve gzip-compressed CSS files if they exist and the client accepts gzip. RewriteCond %{HTTP:Accept-encoding} gzip RewriteCond %{REQUEST_FILENAME}\.gz -s RewriteRule ^(.*)\.css $1\.css\.gz [QSA] #Serve gzip-compressed JS files if they exist and the client accepts gzip. RewriteCond %{HTTP:Accept-encoding} gzip RewriteCond %{REQUEST_FILENAME}\.gz -s RewriteRule ^(.*)\.js $1\.js\.gz [QSA] #Serve correct content types and prevent mod_deflate double gzip. RewriteRule \.css\.gz$ – [T=text/css,E=no-gzip:1,E=is_gzip:1] RewriteRule \.js\.gz$ – [T=text/javascript,E=no- gzip:1,E=is_gzip:1] Content-Encoding header set “gzip” env=is_gzip

Version 1.8.8 added “merge_minify_refresh_done” which is enabled with JS or CSS and cambiado.

Version 1.11 added two new constants: MMR_USE_CLOSURE – allows to disable Javascript minification of Google Closure. MMR_REMOVE_EXPIRED – disable deletion of expired files.

Version 1.13 added two new filters that can be used to exclude specific files: mmr_ignored_css_sources mmr_ingnored_js_sources Version 1.13 also automatically moves WordPress inline styles to a global stylesheet which it then queues.

Note Installing this plugin on a server with the eAccellerator module installed can potentially break because Minify uses anonymous functions that return NULL. View the eAccelerator issue thread

Features

  • Fusionne les fichiers JS et CSS pour réduire le nombre de requêtes HTTP
  • Gère les scripts chargés dans l’en-tête et le pied de page
  • Compatible avec les scripts localisés
  • Crée WP-Cron pour la minification car cela peut prendre un certain temps
  • Minifies JS with Google Closure (requires php exec) with fallback to Minify
  • Minifies CSS with Minify
  • Failed minification doesn’t break the site. Visitors will instead only see the merged results
  • Stores Assets in /wp-content/mmr/ folder
  • Uses last modified date in filename so any changes to JS or CSS automatically get re-processed and downloaded on browser refresh
  • View status of merge and minify on settings page in WordPress admin
  • Option to enable http2 server push (thanks to Daniel Aleksandersen)
  • Option to enable output buffering for compatability and so footer scripts can be HTTP2 pushed
  • Ability to turn off minification
  • Ability to turn off concatination
  • Ability to manually ignore scripts or css
  • Ignores conditional scripts and styles
  • Ability to specify cache directories
  • Ability to generate .css.gz & .js.gz files (Thanks to Marcus Svensson)
  • Works with WordPress Multisite

Installation

  1. Upload the merge-minify-refresh folder to the /wp-content/plugins/ directory or upload the zip within WordPress
  2. Activate the plugin through the ‘Plugins’ menu in WordPress

Reviews

093759b148af026cd97f80ee5a3528e1

Works with caveats

thosenrune August 31, 2022

It seems to me that: * if the CSS files has @includes it will not work. The option to skip CSS seems to be ignored * If the site is password protected (htpasswd protected site) the minifying part will be skipped.

900d8688db608622bc4467a1395ff147

Great plugin.

adnan afzal June 22, 2022

Great plugin. Works as expected. Thank you.

d89314d75d7145458d8f2371969112d3

Much better than autoptimize

un paso adelante June 4, 2022

I discovered that autoptimize generated unwanted 302 redirections. There was a reason for it. autoptimize generates new CSS and JS filenames from time to time. So, then googlebot is lost and autoptimize creates a 302 redirect from old to newly generated CSS and JS files. If you disable their Merge, minify is much better. it uses variables in the URL to show new versions of files. For your information this is the WordPress approach. It is the best because, Googlebot understands it and it does not create a 404 or a 302 when a CSS file or a JS file is refreshed. To my knowledge this plugin is the only one with this approach. It is super simple. The developer of this plugin didn’t add useless features. i like it. You just install and it is ready out of the box. We don’t need other features. We need this plugin to remain efficient with new versions and to remain the best as it is now. I can see that in the background, this plugin does a great job. It reduces the number of files to the minimum and it is really lightweight. By far, this plugin is the best Merge, minify wordpress plugin

f6173a338b04b2bb040dc87a1adcbd02

Not for Woocommerce

cammy999 May 30, 2021

Combines, but doesn’t properly minify .js and fails on dynamic parts of Woocommerce checkout page – vanilla theme – both .js and css.

9c6c8cbc18e50e962d44a790fa27eedf

Ausgezeichnetes Plugin

rado4you May 12, 2020

Funktioniert jetzt auch mit ChildThemes

62392fb67488c9c2488a890ed9412910

Better than autoptimize

bloup June 4, 2022

Compared to wp autooptimize on my website, Wp autooptimize => 13 resources this plugin =>> 10 resources only Also this plugin uses wordpress approach. Rather than creating filenames like: myjavascript293fje29345.js, it uses the query string ?ver=1.6.5. This means that googlebot will still be able to find js and css filenames and it won’t create 404s. Conversely, wpautoptimize recreates new filenames and generates 404s. This creates errors in the console Google search. This is the best approach for wordpress and googlebot crawl. I had google search console errors using wp autoptimize. I guess googlebot prefer this plugin GOOD JOB

Read all 67 reviews

Contributors & Developers

“Merge + Minify + Refresh” is open source software. The following people have contributed to this plugin.

Contributors

  • 1ec4451f8bdc6c7d9e98fd74e89455d8launchinteractive

Translate “Merge + Minify + Refresh” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

1.12.1

  • Fix css minmax minifying incorrectly

1.12

  • Upgrade Closure and PHP Minify

1.11.3

  • Fix issue with css inline svgs breaking

1.11.2

  • Ensure push urls include scheme for backwards compatibility

1.11.1

  • Disable push for external files

1.11

  • Disable Google Closure Javascript minification with constant MMR_USE_CLOSURE
  • Disable removing expired files with MMR_REMOVE_EXPIRED constant
  • Enable push for ignored files

1.10.11

  • Disable MMR when using WordPress Customizer

1.10.10

  • Fix issue where JS/CSS would minify even if minification has been disabled

1.10.9

  • Upgraded to latest version of closure
  • Re-enabled HTTP2 push for when the server supports it

1.10.8

  • Prevent php warning showing when handle path is invalid

1.10.7

  • Fix Reported Security Vulnerability
  • Upgrade Minify to latest version

1.10.6

  • Prevent error if mbstring php extension isn’t installed. Thanks @zelon

1.10.5

  • Convert Western Latin 1 Encoding to UTF8
  • Added upgrade notice callback for future use

1.10.4

  • Fixed Undefined variable: ext (thanks to @imsadhappy)
  • Changed HTTP2 push to only preload

1.10.3

  • Fixed issue with invalid file size calculations

1.10.2

  • Fixed issue with merge_minify_refresh_done action not working correctly

1.10.1

  • Code Cleanup
  • Added ability to http2 push CSS or JS seperately
  • Improved reliability of minification + added hourly cron to check
  • Fix issue with mmr_minify action running multiple times

1.10

  • Added should_mmr filter and split DIVI, Beaver Builder and Visual Composer checks into seperate plugins
  • Code Cleanup
  • Fix warning when running wp.cron.php directly
  • Prevent failed to open stream error
  • Added merge_minify_refresh_merged action

1.9.0

  • Disable MMR when Divi theme is enabled and page is being edited
  • Disable MMR when Beaver Builder is in use and page is being edited
  • Upgrade Google Closure to the latest version
  • Upgrade PHP Minify to the latest version
  • Add check to see if @import is used in CSS file.

1.8.12

  • Upgraded Closure to latest version
  • Fixed MMR so it works when WordPress and wp-content are in non-standard locations
  • Fixed MMR admin unecessarily updating log text

1.8.11

  • Upgraded Minify and Closure to latest versions

1.8.10

  • Fix for PHP < 7. Thanks to @Roy

1.8.9

  • Fix for incorrect function name

1.8.8

  • Multisite URL Fixes
  • Added action that fires when JS or CSS has updated. Thanks to @lucasbustamante
  • Update Closure to latest

1.8.7

  • Update Java detection for Java 9+
  • Clear scheduled hooks on purge and plugin deactivation
  • Update Closure to latest

1.8.6

  • Multisite Network Support

1.8.5

  • Closure now works with string continuations (removed compatibility code)
  • Fix potential bug with minification

1.8.4

  • Fix issue with Last Accessed
  • Fix issue with css files not being enqueued

1.8.3

  • Fix issue with wp_localize_script data not being set correctly

1.8.2

  • Massive code cleanup.
  • Disable MMR in frontend edit mode of Visual Composer

1.8.1

  • Ensure enqueued css/js have unique handles (fix for NEX-Forms)

1.8

  • Updated Closure and Minify to latest versions
  • Code cleanup
  • MMR now checks file extension so that plugins that enqueue php files work (motopress etc.)

1.7.6

  • Added Support for Gonzales. (https://tomasz-dobrzynski.com/wordpress-gonzales)

1.7.5

  • Fix WordPress in subfolder identification issue. (Bedrock compatibility – Thanks plankguy)

1.7.4

  • Fix usage of clone for php7 compatibility check (Thanks for the heads up mariodabek)

1.7.3

  • Improve CSS concatenation (Thanks to fhoech)

1.7.2

  • older versions of gzip don’t have the -keep flag

1.7.1

  • Fix HTTP2 server push only adding header for one file & ignoring settings

1.7.0

  • Added the ability to generate .css.gz & .js.gz files (Thanks to Marcus Svensson)

1.6.14

  • Fix strange characters message when activating plugin

1.6.13

  • Improvements to http2 push (thanks to Daniel Aleksandersen – https://ctrl.blog)

1.6.12

  • Initialise wp_scripts & wp_styles if they haven’t loaded (Thanks Andrew Miguelez)
  • Replace depreciated wp_clone with clone
  • Improved java detection
  • Upgrade to latest version of Minify
  • Upgrade to latest version of Closure

1.6.11

  • Ability to seperate cache urls for javascript and CSS (MMR_JS_CACHE_URL & MMR_CSS_CACHE_URL)

1.6.10

  • Fix concatenation bug (thanks fhoech)

1.6.9

  • Better support for CSS output to the page. This should fix some themes that break.
  • Ability to specify cache directory added. Thanks to Daniel Aleksandersen for help with this.
  • Minor code cleanup

1.6.8

  • Fix External Styles/Scripts ordering

1.6.7

  • Check Java version is sufficient for Google Closure to work

1.6.6

  • Fix bugs introduced by 1.6.4

1.6.5

  • Fix bugs introduced by 1.6.4

1.6.4

  • Fix MMR when WordPress installed in a sub folder

1.6.3

  • Ignore conditional scripts and styles

1.6.2

  • Upgraded Minify to latest version
  • Upgraded Closure to latest version

1.6.1

  • MMR looks for non minified scripts and styles by default (eg. script.min.js = script.js). If found it will use them. This improves compatibility and can fix minification errors.

1.6

  • Option to enable http2 server push (thanks to Daniel Aleksandersen – https://ctrl.blog)
  • Option to enable output buffering for compatability and so footer scripts can be HTTP2 pushed
  • Ability to turn off minification
  • Ability to turn off concatination
  • Reduced plugin memory usage by only including Minify when required
  • Ability to manually ignore scripts or css
  • Changed hashes from md5 to adler32 as it is faster

1.5.2

  • Upgrade Minify to latest version

1.5.1

  • Only load admin js & css on the mmr options page

1.5

  • Display last accessed date in admin
  • Remove unused variables
  • Option to turn off merging

1.4.3

  • Fix wrong variable name

1.4.2

  • Append ; to merged script files to prevent javascript errors

1.4.1

  • woocommerce compatability

1.4

  • Remove unused code in insepect_scripts()
  • Resolved issues with late enqued scripts and styles
  • Changed code for removal of string continuations
  • Stopped dequeing styles and scripts as we now use done

1.3

  • Process styles/scriptes enqued within body of page in the footer
  • Prevent scripts enqued within body of page outputting twice
  • Clear previous processed files fully when purge all clicked

1.2

  • Bugfix

1.1

  • Only write admin ajax response when it has changed
  • CSS now compressed using Minify
  • JS compressed with Minify when Closure not available

1.0

  • Don’t remove unminified files anymore for rare occasions when css or js return a 404 error
  • Admin now updates automatically.

0.9

  • Fix issue with scripts failing to compile because of remove_continuations

0.8

  • Fix bug when javascript and css has same handle

0.7

  • Bugfix

0.6

  • Remove Javascript String Continuations
  • Show queued scripts/css in admin
  • Prevent YUI Compressor stripping 0 second units (minified transitions now work)

0.5

  • Ensure file paths are absolute
  • Use ABSPATH instead of DOCUMENT_ROOT

0.4

  • Ignore CSS url paths that start with http

0.3

  • Minor code refactoring and cleanup

0.2

  • Log error when exec not available
  • Fix remote url detection
  • Fix admin header redirect

0.1

  • Initial Release

Meta

  • Version: 1.13.2
  • Last updated: 3 months ago
  • Active installations: 9,000+
  • WordPress Version: 3.6.1 or higher
  • Tested up to: 6.0.2
  • Tags:

    cierre concatenar fusionar minificar actualizar

  • Advanced View

Calificaciones Ver todo

  • 5 estrellas 49
  • 4 estrellas 4
  • 3 estrellas 3
  • 2 estrellas 1
  • 1 estrella 10

Inicie sesión para enviar una reseña.

Contributors

  • 1ec4451f8bdc6c7d9e98fd74e89455d8 launchinteractive

Support

Issues resolved in last two months:

0 out of 1

View support forum

Donate

Would you like to support the advancement of this plugin?

Donate to this plugin

  1. Hogar
  2. Resource Center
  3. Knowledge Base
  4. WordPress Tips
  5. How to Combine External CSS in WordPress

How to Combine External CSS in WordPress

Last update: April 25, 2022

External CSS Combinatorclose

Seeing the “combine external CSS” warning in Pingdom, GTmetrix, or Google PageSpeed ​​Insights? You are not alone, as this is a very common mistake for many WordPress website owners. This warning usually appears when you have 10 or more CSS files loaded from a CDN and/or subdomain (external domain). One way to solve this problem is to concatenate your CSS files or combine them so that they load in a single request.

Note: If you are using HTTPS with a provider that supports HTTP/2, this warning can generally be safely ignored now. With HTTP/2, multiple CSS files can now be loaded in parallel over a single connection.

external css advertising pingdom combinatorCombine External CSS Disclaimer in Pingdom

If you are still running over HTTP and haven’t migrated to HTTP/2 yet, you can follow the tutorial below on how to combine external CSS files. Again, concatenation is now a technique that is generally considered deprecated. Over 77% of browsers now support HTTP/2 when running over HTTPS, as well as many CDNs and web hosting providers, including Kinsta. It is also important to note that Pingdom doesn’t support HTTP/2 yet since it uses an older version of Chrome.

In a hurry? Save this article as a PDF.

Tired of scrolling? Download a PDF version for easier offline reading and sharing with coworkers.

Download

Combine External CSS in WordPress

The combined external CSS warning usually appears when using a CDN because you are hosting your CSS files on an external domain, such as cdn.domain.com. What you can do is simply concatenate your CSS files on your web server. Once they are combined, you will no longer see this warning as it will load them in a single request. One of the easiest ways to do this is to use a free WordPress plugin called Autoptimize, developed by Frank Goossens.

automatically optimizeAutomatic optimization plugin

Ce plugin est assez léger, seulement 176 Ko pour être exact. Au moment d’écrire ces lignes, il compte actuellement plus de 1 000 000 d’installations actives avec une note de 4,7 étoiles sur 5. Le plugin vous aide avec la concaténation de vos scripts, la minification, les en-têtes d’expiration et la possibilité de déplacer des styles vers votre en-tête et des scripts vers votre pied de page.

You can download it from the WordPress repository or by searching for it in your WordPress dashboard under “Add New” plugins. Once installed, you’ll want to go to settings and enable the “Optimize CSS code” option. This will concatenate (combine) your CSS files. And if you’re using a CDN, be sure to enter your CDN URL. This way, your CSS files will load in a single request to your CDN.

Kinsta customers get direct access to the code discount feature which is integrated right into the MyKinsta table. This function allows customers to enable the automatic minification of CSS and JavaScript with a single click in a button.

external css archive combinatoriumExternal CSS combinatorial archives

After activating the previous configuration, we will now see the CSS archives in an “autoptimize_xxxxx.css” archive.

css archive combinationsCombined CSS Archives

Ahorre tiempo, costos y maximice el rendimiento del sitio con:

  • Instant support from WordPress alojamiento experts, 24/7.
  • Cloudflare enterprise integration.
  • Global Audience Alcance with 35 data centers worldwide.
  • Optimización con nuestro monitoreo de rendimiento de applications integrado.

Todo eso y mucho más, en un solo plan sin contratos a largo plazo, migraciones asistidas y una garantía de devolución de dinero de 30 días. Consult nostros planes o hable con ventas para encontrar el plan adecuado para usted.


Video Combine external javascript wordpress plugin

Related Posts

Automatically update wordpress plugins

Contents1 WordPress® Automatic Updates – Should You Use Them?1.1 The Benefits of WordPress Automatic Updates1.2 The problem with WordPress automatic updates1.3 What if the automatic update breaks…

WordPress mortgage calculator plugin

Contents1 Etiqueta del complemento: hypothetical calculator1.1 Calculadora de hipoteca receptiva1.2 mortgage calculator1.3 Calculadora de hipotecas / Calculadora de préstamos1.4 WordPress Estatik Mortgage Calculator1.5 Simple Mortgage Calculator1.6 WP…

WordPress google search plugin

Contents1 How to Add Google Search to a WordPress Site1.1 Step 1 – Download a Google search plugin1.2 Step 2: Manage your Google search settings1.3 Step 3:…

WordPress responsive menu without plugin

New Page How to Create a Mobile-Ready Responsive WordPress Menu Last Updated OnOctober 3, 2016by Editorial Team | Reader Disclosure Disclosure : Our content is endorsed by…

Gravity forms wordpress plugin

Contents1 Etiqueta del complemento: formas de gravedad1.1 Armadura WP – anti-spam honeypot1.2 Spam-Free Gravity Forms1.3 Seguimiento de events para formularios de gravedad1.4 Severity Shapes + Custom Post…

WordPress plugin fundraising thermometer

Contents1 donation termometer1.1 ¿Cómo uso los valores dinámicos?1.2 The [therm_r] and [therm_t] shortcodes show different values to the thermometers.1.3 Can I display the thermometer as a percentage…