How to minimize HTTP requests
-
Hi,
I’m now concentrated on the very first grade of YSlow, for which I got an F — Make fewer HTTP requests.
This page has 11 external Javascript scripts. Try combining them into one.
This page has 9 external stylesheets. Try combining them into one.But I’m lost at how to fix this, and a lot of the solutions didn’t here. Here’s what I have tried so far:
WP Minify – Screwed up the whole template. Dropped.
JS & CSS Script Optimizer – Also didn’t work properly with my WordPress. Dropped.
Better WP Minify – Using this one now, it didn’t screw up anything, but it didn’t help at all either. I get the same result with HTTP requests.I’ve also put this code into the header:
echo "<script type='text/javascript'>"; include_once "all_js.php"; // to include the all_js.php that contains js code of the site echo "</script>"; echo "<style type='text/css'>"; include_once "all_css.php"; // to include the all_css.php that contains css code of the site echo "</style>";
It was supposed to compress all requests into one, but nothing happened.
Any ideas/advice on how to minimize those requests and compress JS and CSS?
Thank you!
- The topic ‘How to minimize HTTP requests’ is closed to new replies.