PrankZapper - packer, minifier & gzipper for JavaScript & CSS
Some concepts borrowed from
SmartOptimizer by
Ali Farhadi.
Used packers / minifiers are
CssMin and
JavaScriptPacker (Nicolas
Martins PHP port of Dean Edwards'
packer.)
Some WordPress concepts borrowed from
WP Super Cache.
What is this?
This plugin, in essence, finds a specified file, packs it, creates a gzipped
version of it, and saves it in a cache folder.
- If you want to access the raw version of the requested file, add the nocache
variable to the url (configurable, defaults to "nocache".)
- The gzipped version of the file will only be created if the client indicates
that it supports gzip.
- The WordPress activation my not work properly. I'm not a htaccess, nor
a WordPress expert. It works in my tests though.
Disclaimer
This is an ongoing experiment, and it is in continuous alpha stage, so use it
at your own risk. If you have comments or suggestions, post an
issue or
contact me through
email.
Enjoy ;)
- Upload the
PranZapper
folder to the /wp-content/plugins/
directory
- Activate the plugin through the 'Plugins' menu in WordPress
- Enjoy.
Beware: the plugin will add the following entry to your .htaccess file, which
may conflict with other rules.
.htaccess:
RewriteRule ^(.+)\.(js|css)$ "/PrankZapper.php?file=$1.$2" [NC,L,QSA]