Minify ExtJs on the fly

I have been developing some projects with ExtJs for a while and also created some plubg-ins and extensions for these projects. Recently, I found out that I have so many *.js and *.css codes and they are somehow too fat for some slow band width users. Well, I decided to google some solutions to minify my js and css codes. Luckily, I found minify and I am loving it. However, most of my ExtJs plug-ins and extensions are called by Ext.require and it is somehow complicated to override the Ext.Loader.require so I googled again... Ha... the answer came up from here (Using .htaccess and RewriteRule? for Minify).
   Options +FollowSymlinks
   RewriteEngine On
   RewriteBase /
   RewriteRule ^(.*\.(css|js).*)$ min/f=%{REQUEST_URI} [L,NC]

The original post is just rewrite the file name but I need full path.
Well, just replace $1 to %{REQUEST_URI} and put the .htaccess file under the Ext.ux path.
Then job done.

So when you call:

The Apache server redirects the JS script URL and the minify class process it.
Have a try and your will love it...

Related Posts

In case you missed it

A short update from me
A short update from me
It has been a while since I post a blog page on Blogger which was created back in 2013. So I took an opportunity to...
Showcase the blog site elements
Showcase the blog site elements
The standard paragraphs Welcome to this demo page! Here, you’ll get an exclusive preview of our cutting-edge platform designed to revolutionise your digital experience. Our...
Issue with
Issue with "Don't track your own pageviews"
Do you use your own domain name with Blogger? Do you place “Blogger’s Stats Widget” on your page? Or do you regularly check up the...