Ahmad Awais

SHARE


WordPress and HTTP/2 — What Developers Need to Know?

Ahmad AwaisAhmad Awais

Can you imagine what would happen if you try to develop a website with a computer which you bought in 1997? — Yes! That’s even before Google — I want you to stop reading for a moment — stop everything and close your eyes — just imagine how it would be to do what you do now on a computer that old?

HTTP2_AhmadAwais

Front-End Development Pain Points

If you read my previous post about Advanced Gulp Workflow for WordPress, chances are you already know a lot about the pain points of front-end development. So, instead of explaining what they are, let’s shift our focus towards HTTP/2 in this post.

If you’re still reading this post, it means you have an above average interest in how the internet works, while you’re at it take a look at super cute web comics about How DNS Works by good folks at @DNSimple.

So, let’s begin with the front-end development pain points, shall we.

So, what’s the deal?

HTTP 1.1 was standardized in 1997. While it did a good job, it is no more efficient and to top it off, it was designed 16 years ago. Just like the desktop you had in 1997, this protocol was not designed to deal with today’s internet. It was designed before we even knew what the world wide web would become. So, to get it working in this age, we had to improvise hacks that could help make our websites fast and more optimized.

Why We Needed These Hacks?

Let’s review why we needed these performance techniques in the first place.

Why HTTP/2

HTTP/2 is efficient and fast. HTTP/2 is almost here. The fun fact is that your browser most probably is already using HTTP/2.

I ain’t no expert on this topic, which is why I won’t go into details, though, as James Spader would say in Boston Legal —”I know enough to be dangerous”.

If, like me, you develop WordPress themes, then here is what you really need to know. Hacks and performance fixes which we had for HTTP 1.1 will actually slow down your theme’s page loading speed in HTTP/2.

How?

Why?

What?

Well, let’s see what makes HTTP/2 so much better when compared with the 16 years older version.

Advantages of HTTP/2

What Can YOU Be Doing Wrong?

In context of HTTP/2 being rapidly accepted by browsers here’s what you could be doing wrong in an ideal world with browsers, hosts and CDNs serving sites over  HTTP/2

If you are developing a site which you know is going to be served over HTTP/2 then don’t use any of these legacy performance hacks.

I Want a Demo?

Here’s the mini-cherry on top of the regular cherry on top of the sundae of awesomeness i.e. HTTP/2 — A few demos and implementations of HTTP/2

Which Browser Support HTTP/2

HTTP/2 Support for HTTP/HTTPS Servers

There’s an excellent write-up by Daniel Stenberg going into much more detail available as a PDF.

What Is Your Take on This?

🎩

WPTakeaway: Premium WordPress Newsletter!

Takeaway my professional opinion about Full Stack WordPress Development, building a business, growing a family, and everything web! Delivered to your inbox twice a month. 👻 I hate spam! Pinky Promise!

🥑 OSS Developer Advocate 🔥 Ridiculously hard-working Full Stack Web DeveloperRegular WordPress Core Contributor 📣 TEDx Speaker ✌️ Spends 50% of his time building FOSS (Free & Open Source Software) used by over 91,300 Developers 🎖 WordPress Advocate & 🙌 Community Evangelist 🎯 JavaScript & DevOps fanboy 😂 Cracks silly jokes 💜 Loves his wife (Maedah) 🍕 Learn more about Ahmad ↣

Say 👋 on Twitter @MrAhmadAwais | Subscribe to the WordPress Takeaway!