eazyGen
December 1, 2011, 6:50am
#1
Hi guys,
I am using libComiler to consolidate all css and js files into only two.
The size of the resulting js file (dhtmlx.js) is 1,085kb
This is not the end of the world, but can anyone recommend a technique to reduce the size of this file and hopefully speed up load times.
I am only interested in things that will work in a production environment. I don’t mind waiting a short while in dev.
Many thanks in advance.
S
Just gzip the file ( or configure your server to do it automatically )
The gzipped file will be about 200kb
eazyGen
December 13, 2011, 5:06am
#3
Thanks Stanislav.
I have not done this before, so a follow up question if I can?
if I declare the file dhtmlx.js in my , are you suggesting that I create dhtmlx.js.gz (gzipped), declare that, and then simply let the user browser uncompress the file when the page is loaded?
Many thanks for your help.
S
Direct approach will not work, you need to configure server to gzip files and send extra header to client
check developer.yahoo.com/performance/rules.html , “Gzip Components” section