Hi... We have made a new website in wordpress using a theme, when we check the Google speed test there are approx 32 javascripts rendering, i.e 32 HTTP requests which is too much. Is there a way I can combine all into one or ZIP them to one so that with one HTTP request it could render all the scripts?
WHAT??? 32 javascript files???....Welcome to turdpress and all it's pointless bloatiness Basically there is nothing you can do but take it outside and shoot it, Put it out of it's misery.
The problem is that all the plugins and themes in WordPress load their own scripts. This is a problem which is hard to mitigate without rewriting plugins / core functions.
Use the W3 Total Cache Plugin - it helps you minify many JS files into one combined file, and hence reducing the number of HTTP requests by a significant amount.
Welcome to why I say turdpress has no business being used for business. There are tricks -- like the one @raajtram mentioned -- that can reduce it, and you could combine the scripts manually as well, but if there's that much scripting "needed" for the page in the first place, there's something horrifyingly and disastrously wrong with the page. Hence @malky66's reaction... and I guess @PoPSiCLe said it too -- both doing so WAY more politely than I normally would. There is just so much asshat BS that goes with a turdpress template, that I can't fathom how most people have the patience or are willing to put so much effort into dealing with it. I mean, take the infographics site in your siggy -- (which is blogger, not turdpress -- same difference, crappy off the shelf solution) -- endless static style in the markup (100% of the time someone uses <style> they're doing something wrong), <style> inside <body> where it's completely invalid, clearing DIV like it's still 1998, massive static scripting in the markup, endless pointless "JS for nothing" rubbish, absolute URI's wasting bandwidth for *** knows what, little if anything resembling logical document structure or semantic markup, endless pointless idiotic mouth-breathing dumbass ignorant halfwit use of classes... That's how one ends up with 71k of markup to deliver 5.5k of plaintext and less than a dozen content images -- basically ten to twelve K of HTML's job! Basically, everything one can expect from a any of these "one size shits all" solutions. If you care at all about speed, accessibility, functionality, and code sanity, no off the shelf solution is going to provide it... and things like W3 Total Cache is just "throwing more code" at the problem instead of fixing the actual cause... the garbage nonsense 99.99% of turdpress templates have the unmitigated gall to call code.