Bundle website files. Developed by Anna Svensson.
Download ZIP file and copy it into your system/extensions folder. Learn more about extensions.
This extension bundles and minifies files for a better loading time. Your website may contain multiple CSS and JavaScript files. Usually these will be cached in the browser, but nevertheless each file has to be checked. This is where a file bundler comes in. It looks in the HTML header for included files and replaces them with one single file for CSS and one for JavaScript.
If you don't want that a file is bundled, specify data-bundle="exclude" in the HTML header.
Website with unbundled CSS and JavaScript files:
<!DOCTYPE html>
<html>
<head>
<title>Example page</title>
<link rel="stylesheet" type="text/css" media="all" href="/assets/gallery.css" />
<link rel="stylesheet" type="text/css" media="all" href="/assets/icon.css" />
<link rel="stylesheet" type="text/css" media="all" href="/assets/stockholm.css" />
<script type="text/javascript" defer="defer" src="/assets/gallery-photoswipe.min.js"></script>
<script type="text/javascript" defer="defer" src="/assets/gallery.js"></script>
</head>
<body>
<h1>Hello world</h1>
</body>
</html>
Website with bundled CSS and JavaScript files:
<!DOCTYPE html>
<html>
<head>
<title>Example page</title>
<link rel="stylesheet" type="text/css" media="all" href="/assets/bundle-dfd1ef8a4c.min.css" />
<script type="text/javascript" defer="defer" src="/assets/bundle-3808f805bc.min.js"></script>
</head>
<body>
<h1>Hello world</h1>
</body>
</html>
Website with bundled and unbundled files:
<!DOCTYPE html>
<html>
<head>
<title>Example page</title>
<link rel="stylesheet" type="text/css" media="all" href="/assets/bundle-dfd1ef8a4c.min.css" />
<script type="text/javascript" defer="defer" src="/assets/bundle-3808f805bc.min.js"></script>
<script type="text/javascript" defer="defer" data-bundle="exclude" src="/assets/debug.js"></script>
</head>
<body>
<h1>Hello world</h1>
</body>
</html>
This extension includes Minify 1.3.75 by Matthias Mullie. Thank you for the good work.
Do you have questions? Get help.