Why Google is Trying to Kill JavaScript with AMP

This year I noticed that Google is really pushing Accelerated Mobile Pages (AMP) before they do mobile-first indexing in September. In my opinion, Google is going to start giving AMP pages a better ranking advantage because if you have an AMP version of that page not only will your page load faster but it is also a Google product, which Google gives you brownie points for. 

slow_internet_connection_computing_snail_thinkstock_178034346_primary-100413872-large.jpg

However, I am finding while creating AMP pages that you cannot add custom JavaScript. I started to ask my self why Google would do this, and it became clear that because JavaScript slows pages down significantly so Google wants very limited Javascript on AMP pages. So is this to the benefit of the user experience or is this Google trying to take over a make a universal code that they want everyone to use one day.

What is AMP?

Let discuss what AMP is, just in case you are new to this concept. AMP is an open-source framework developed by Google in collaboration with Twitter. Accelerated Mobile Pages create better, faster experiences on the mobile web. At its core, the framework allows you to build lightweight experiences for mobile by simplifying the HTML and following streamlined CSS rules.

AMP was originally considered to be developed in response to Facebook’s Instant Articles. However, over the years, it has become a powerful platform for delivering content directly from search results at almost lightning speed. Earlier this year, Google drew a line in the sand with the announcement that it will push for adding AMP technology framework to web standards.

What is JavaScript?

Most people know what Javascript it because it has been around for a long time but let’s explain for beginners. JavaScript is a scripting or programming language that allows you to implement complex features on web pages — every time a web page does more than just sit there and display static information for you to look at — displaying timely content updates, interactive maps, animated 2D/3D graphics, scrolling video jukeboxes, etc. — you can bet that JavaScript is probably involved. It is the third layer of the layer cake of standard web technologies, two of which (HTML and CSS) we have covered in much more detail in other parts of the Learning Area.

Why Does Google Hate JavaScript?

AMP pages do not support regular custom JavaScript. AMP pages with custom JavaScript will not be validated as an AMP page. Instead, the AMP format has custom tags that are focused on resource loading and ensuring fast rendering of AMP web pages.

bp064-1-vs.jpg

JavaScript is the code that makes your website functional and interactive for users. However, if left unoptimized, JavaScript can delay your pages when they try to load in users' browsers. Google has stated that if your website takes longer than 3 seconds to load it is considered slow in their eyes. If you look at most websites out there on the internet the only ones that load quickly are the ones with little to no JavaScript. If they do have a lot of JavaScript on their site and it still loads under 3 seconds that means they have optimized it to the best of their ability with the help of a Javascript expert, which you do not see often. So, Google probably thought why don’t we just eliminate JavaScript altogether and create our own language which is fast and has many features to make websites look nice and interactive. In the future, all websites will have to AMP to load fast for mobile which will create a better user experience. Also, if you do not use AMP pages, we will not rank you high on the search engines anymore. That is why AMP was created in my opinion.

Conclusion

Personally, I like Javascript and I do not think it is going to be eliminated anytime soon. It is a coding language that is widely used in the coding world and most coding experts use it. However, unless there is a way to speed up all Javascript languages across the board, I can see a world where future generations don’t use Javascript because Google has phased it out with their more popular AMP language. Google is going to give incentives to have AMP pages by helping you rank better on the search engines. This affects businesses’ bottom lines which will force online businesses to make AMP a bigger priority than it is now. Unfortunately, it looks like Google will win this battle of AMP vs Javascript because 95% of people that search on the internet use Google. Unless that changes Google will always have the upper hand and be able to force users to use their products or there will be consequences that will affect online businesses’ profits.