2

I'm use YSlow to optimize my web pages it says: This page has 34 external Javascript scripts. Try combining them into one. This page has 5 external stylesheets. Try combining them into one. but all I have in this page is some blocks and menus and a nivo slider which I think is the main reason of this issue!! so I think nivo slider sends all this requests!! How can I improve it?

2
  • 34 javascript files sounds like a lot, maybe you could just enable core CSS & JS aggregation at admin > config > development > performance. Mar 29 '15 at 8:25
  • those are enable!!
    – shekoufeh
    Mar 30 '15 at 4:53
3

There are couple of things you can do,

  1. install labjs module: it is a JavaScript loader, used by Twitter, Vimeo, examiner.com... which loads (and executes) all scripts in parallel as fast as the browser will allow.

  2. Enable gzip compression: It reduces the size of files sent from server to increase the speed. You have to enable it in .htaccess file, for more information visit this page.

  3. As @2pha said Advanced CSS/JS Aggregation is very effective effort.

  4. Install optimize_db module: it handles the issue with fast-growing table cache_form.

Anyway, gtmetrix suggests many techniques to improve your website performance.

3
  • thanks a lot! I should choose one of this suggestions or I must do all of theme in parallel?
    – shekoufeh
    Mar 29 '15 at 8:02
  • Use all of the in parallel.
    – M a m a D
    Mar 29 '15 at 8:25
  • thanks Drupalist. these approaches helped in other ways but doesn't reduce the external http requests!
    – shekoufeh
    Mar 31 '15 at 8:20
1

What have you tried already?
I use the Advanced CSS/JS Aggregation module which combines js and css file together making for fewer http requests. It also has some other features including moving js and css to the footer.

10
  • I've tried to combine all css files together. same for js files. but I afraid making a worse trouble anyway. have you tested this module?
    – shekoufeh
    Mar 29 '15 at 7:59
  • I have used this module on over 30 sites. My answer is specific to JS, there are many other optimizations one can do to speed up a drupal site. Doing a quick search on google for 'drupal perfomance' will yield many results
    – 2pha
    Mar 29 '15 at 8:31
  • before installing or enabling this module you should uncheck css/js aggregation in performance setting. otherwise your theme will be vanished. this happened for me and I was furious!
    – shekoufeh
    Mar 30 '15 at 4:52
  • This page has 12 external Javascript scripts. Try combining them into one. This page has 31 external stylesheets. Try combining them into one. why it get worse using this module?
    – shekoufeh
    Mar 30 '15 at 5:25
  • 1
    You are setting it up wrong. Did you read the readme file?
    – 2pha
    Mar 30 '15 at 8:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.