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:
Ext.require([
'Ext.ux.SimpleIFrame',
'Ext.ux.PreviewPlugin',
'Ext.ux.GMapPanel'
]);
The Apache server redirects the JS script URL and the
minify class process it.
Have a try and your will love it...
How to find the best casino? - Mapyro
ReplyDeleteFind the best casino for you! · You can 천안 출장마사지 play 동해 출장샵 a bit more on one of the games that are available for 경주 출장샵 free right now. · To find an online 용인 출장샵 casino, simply visit 군산 출장마사지