Save money and make your website better—by killing JavaScript

The content below is taken from the original (Save money and make your website better—by killing JavaScript), to continue reading please visit the site. Remember to respect the Author & Copyright.

Bandwidth, storage space and computing power (CPU/RAM/etc.) on your web servers represent a distinct and noteworthy cost for any company with a major online presence.

As traffic to a company’s website increases, most opt to throw money at the problem. More servers. Caching systems. More bandwidth. 

But these are Band-Aids—temporary solutions to the problem, solutions that will only suffice for so long before yet another round of “throw money at the problem” is required to keep up with ever-growing web traffic. 

The real problem is simple: Your web pages are just plain too big.

Way too big. Enormously large. The average website is 2.9 MB in size (as of May 15, 2017). And that’s just the average—an average that is growing. Fast.

Just six months prior, in November 2016, the average was closer to 2.4 MB. One year before that, in November 2015? It was 2.2 MB. In 2014? It was 1.9 MB. And in 2013? 1.6 MB.

That’s right. The average size of a web page has almost doubled in the last 3 1/2 years. At the current growth rate during 2017 (more than 1 MB per year), the average web page will clock in at over 8 MB in the next five years. 

Many (many) websites are far larger the average. CNN.com, for example, currently clocks in at a whopping 5 MB. And that’s for a website that is supposed to just show us the news headlines. Is CNN.com dramatically more useful than it was 3 1/2 years ago? No way. Same basic value and content—but the page sure did load a lot faster back then (even on slower internet connections).

The larger the website, the more bandwidth and storage space is needed. If your website, for example, was 3 MB, and you manage to reduce the page size down to 2.5 MB—you’ve just saved nearly 17 percent on your bandwidth costs. And that is with a measly reduction of 500K in website size. 

And, let’s be honest with ourselves, most corporate or organizational websites (we’re talking single pages here, such as the home page) shouldn’t need to be even 1 MB, let alone 3 MB. If you can get your size down from 3 MB to less than 1 MB? You’ve just cut your bandwidth needs down to one-third of what they were. Serious cost savings. 

Not to mention the fact that visitors to your website will now experience page load times significantly faster than your competitors—thus increasing the likelihood that those visitors will stick around and actually read your content.

2 ways to reduce website size

So, how do you get there? How do you get page sizes down so small? 

Two simple strategies:

  1. Cut out all unnecessary JavaScript on your site. And by “unnecessary” I mean pretty much all of it. Take a hard look at any JavaScript library or custom code you load with your website and ask yourself a simple question: “Is this 100 percent necessary in order to display my words and images to my site visitors?” The answer is probably, “No, it’s not necessary.” So, cut it out. 
  2. Use fewer images and optimize them better. This is an easy one. Very few web developers will disagree with this statement. So, spend your time focused on item #1 above.

The reality is, a little bit of JavaScript isn’t such a horrible thing. But it’s overused to an absolutely ridiculous degree. And the result is large, bloated web pages that are eating up your bandwidth (and your IT budget) and causing visitors to your site to get annoyed at how slowly your pages load.

One way to help with this problem is to make sure that your web pages load properly and are readable and navigable, using text-only web browsers (such as w3m or lynx). 

A very small percentage of your potential visitors will be using text-only browsers. But, by ensuring compatibility with them, you are forcing your teams to produce web pages that load fast, use relatively small amounts of JavaScript, save on your bandwidth/server costs, and, as a wonderful side effect, are more usable for people with vision problems. 

Not to mention the fact that if your website loads well in something as “old school” as the lynx web browser, it will almost certainly render properly in almost every web browser on the planet, thus earning you additional platform and browser compatibility without any extra work. 

Save money. Make visitors happier. Have a larger potential visitor base.

It’s a no-brainer. Get rid of all that JavaScript bloat.

Join the Network World communities on

Facebook

and

LinkedIn

to comment on topics that are top of mind.