Still minify and concatenate CSS and JS files? • Yoast


To work properly, websites contain multiple CSS and JavaScript files. These must be fetched from the server by the visitors’ computer, to fully load a webpage. In the old standard, HTTP/1, only one request at a time could be handled, so minifying and concatenating multiple files was a good idea. Otherwise, visitors would experience a slow website because of too many requests. The new standard, HTTP/2, allows for much easier communication between a visitor and the server.

So, does this increasing move to HTTP/2 mean that it’s no longer necessary to minify and concatenate your CSS and JS files? After all, site speed is still crucial for SEO. Let’s get into that in this Ask Yoast!

Danny O’Neill emailed us his question:

‘With the increasing move to HTTP/2 should we still minify and concatenate our CSS and JS files?’

Watch the video or read the transcript further down the page for my answer!

Is it still necessary to minify and concatenate your CSS and JS files?

“In the old standard, HTTP/1, the browser could only open so many files at the same time on your server and thus it was smart to combine those files into larger concatenated files. In HTTP/2 that’s not needed anymore, so no, you don’t necessarily have to do that.

What you need to look at is which portion of your traffic already supports HTTP/2. If that’s the large majority then you can stop doing that altogether. Good luck!”

Ask Yoast

In the series Ask Yoast we answer SEO questions from our readers. Have an SEO-related question? Let us help you out! Send an email to [email protected].

(Note: please check our blog and knowledge base first, the answer to your question may already be out there! For urgent questions, for example about our plugin not working properly, we’d like to refer you to our support page.)

Read more: ‘Performance optimization in an HTTP/2 world’ »



Source link

?
WP Twitter Auto Publish Powered By : XYZScripts.com