Welcome Guest, Not a member yet? Register   Sign In
SmartOptimizer - handy dynamic script for reducing size css and js files
#1

[eluser]Lone[/eluser]
Just came across the following PHP script that has some awesome potential in reducing your page load times by automatically compressing and caching CSS, JS files and a few other tricks. The best part is when you use htaccess for it that it is totally seamless and no change to path calls needed at all.

http://farhadi.ir/works/smartoptimizer

Have a look and give it go and let me know any opinions on it. Just on testing it myself on a demo page I reduced the following:

JS - 44KB to 21KB (including jQuery library)
CSS - 19KB to 8KB

Has some other nice features such as compressing multiple css/js files into a single file (lower http requests). Heres the full list from the site:

Quote: * SmartOptimizer increases your website download speed by reducing the size of JavaScript and CSS files approximately up to 80% or even higher.
* SmartOptimizer reduces count of http requests by concatenating JS/CSS files together.
* It also reduces http requests by embedding CSS images and CSS imported files.
* If your website has a large amount of JavaScript and CSS files, SmartOptimizer reduces your monthly bandwidth usage amazingly.
* SmartOptimizer generates minified, compressed, combined and embedded files on the first request and caches them on the server and uses the cache on future requests.
* It doesn't embed duplicated urls (i.e. css sprites) in css files for better performance.
* It also knows to regenerate already cached files if the originals have been changed.
* SmartOptimizer handles browsers that doesn't support gzip encoding and sends them non-gzipped content.
* It also forces the browser to cache the files optionally forever or until they have not changed.
* SmartOptimizer removes Etag headers. (for better performance on clustered servers).
* It is very easy to install and usually there is no need to do any changes on your codes.
#2

[eluser]Tom Glover[/eluser]
Nice features, where can we get it from?

EDIT: Dippy me just seen the link!
#3

[eluser]Lone[/eluser]
Heres a link to how we have set it up in our install in CI:

http://lab.pxwebdesign.com.au/codeignite...e-loads/17

The special part is that we are using the standard CI cache directory along with hiding the folder in the applications folder.
#4

[eluser]a&w[/eluser]
I tried merging my .htaccess with what you had set up but I get a misconfiguration error.

Have you removed index.php from your url or could you post how you would go about it?




Theme © iAndrew 2016 - Forum software by © MyBB