[ Video Sharing CMS v4 ] minify js/css requests

Started by ollipaust,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ollipaustTopic starter

hello,

I'd like to make my website as fast as possible and for this i need to minify the javascript and css requests, since there are a lot.

I tried to use the script "Bender", but I couldn't implement it into the header, cause as I can see, the header is created by a jquery command and I cannot put php code into a jquery code.

I'd like to mention i am not a professional programmer and obviously I am doing something wrong.

Could you please give me a suggestion how to do this?

I am trying now the script "minify" (https://github.com/mrclay/minify)

Lets see and thanks in advance...
  •  

marius20foc

the script is already "minified", unless you made heavy changes to .css/js then you would not be succesfull  :-\


Quote from: Alexander on
The cms comes with development scripts, they are expected to be compressed for production :)
Also using a subdomain for a cdn is a good option.
  •  

ollipaustTopic starter

but I still have a lot of css requests in the header and the bottom of the <body>

I'd like to put the 11 javascript files and the 6 css-files into 1css and 1js file

  •  

marius20foc

from a non-developer and noob point of view(mine ::) ) it would be a bad decision.

think about it, now, with 11 js files, not all of them are used/called in a secific moment.
what if you would have a 750Kb .js file that it will run every single time one of those 11 would have had run.

just my 2cents.
  •  

ollipaustTopic starter

as I learned, when you have resource-requests in your page, it causes more traffic which mean it slows down your website

it doesnt matter if they are used or not. when you have a <link href="...css"> in your header, the server still sends the file to your browser

not 100% sure about this, but this is what I have read about optimizing website speed.

when I look at facebook's or youtube's source-code, can only find 1-2 css files which are compiled too
  •  

marius20foc

D@mn, u made me look at Facebook's code  ;D

I can see like, 19 different .css files and no .js  :) Can't fully compare phpvibe with facebook, those lad's use LAMP + lots of inhouse development software.

I just replied what was I told when i said I wanted improvements in this area  ???
  •  

PHPVibe A.

Hi, the header is a plain php function, it's in tpl.globals.php, and footer is there to.
Will test and come with a tutorial for you guys.

gzip with .htaccess should improve speed as well.

Similar topics (7)