Measure That Page (2016JAN272103.00 by Peter Renshaw)
Measure That Page
Wednesday, 27 January 2016 19:55 Hrs
❝ Why am I disabling and measuring web pages?

The Web was once fast and snappy. The browser plugin changed this. So what happens if you turn JavaScript off?

Sans JavaScript

At first glance, almost nothing.

Then you realise, nothing works. For quite a while now, I've been browsing and browsing and browsing and restricting the ability for a plugin to work. All plugins are blocked. Web pages with embedded Flash, JavaScript, Java [0] cannot run, with-out my permission.

I turn JavaScript off on every page I visit. Then, if I trust the site, I turn JavaScript on. It' all about trust. The tool I use is NoScript. [1] It is easy to install, Open Source and works as a plugin to my browser family of choice, Mozilla. It has been an illuminating experience. The reason is simple. Control.

Control

Do you control what code is executed on your machine? You should, for lots of reasons; reduce the potential for security exploits; curtail surveillance; improve performance. Performance wasn't the original reason I started locking down web pages, It was security. Block Flash, improve your security. No more root exploits. Then came performance. My browser would often hang, waiting for some JavaScript code to load and execute.

Now I must admit this is partially my fault. I like browsing with half a dozen tabs, some require extensive plugin use. There are also things out of my control. I have no say on the sub standard bandwidth where I work. In my daily Web habits I started to notice some interesting side-effects.

Side Effects

The first most obvious thing I notice is anything that uses Flash, fails.If the page is using any fancy JavaScript, fails. Click a button, it doesn't work. Where is the fall back? Does't anyone take this scenario into account? In my efforts to gain control, I make it harder for myself. Turning off JavaScript, I have to turn it back on again if I want things to work.

The next most obvious side effect I notice is the speed. HTML loads, Images load, css files load even the JavaScript, but it doesn't execute. Curious I decided to find out just what constitutes a modern web page.

Measure

So I hacked together some code. The idea behind the code is simple. Given a URL, load that page, inspect the HTTP headers, determine the size of the page. Then inspect the contents of the page, searching for anything that will load, favicons, Images, CSS pages, JavaScript while checking for data URI's. Then add them up. What you get is the total weight of the page. I have tried this on quite a few pages and the first thing I noticed was the sheer number of calls to images. I haven't broken down the numbers yet, but on some sites, the weight of a page is doubled or tripled by included images. Maybe a NoImage plugin should be made? That or use Lynx.

I will follow this up with some details and some observations coding. And yes, I know there are probably tools out there to do this. Understanding and just using tools are two different things.

My first task is to see what effect changes in templates, style and images have on this site and can I shave off a lot more weight.

Reference

[0] Does any company, person still use Java as a plugin?

[1] NoScript An open source Firefox extension for Mozilla based browsers that allows you to block per tab, JavaScript code executing with some granularity.

[Last Accessed: Wednesday 27th January, 2016]

―~♞~―

bio Another Scrappy Startup ☮ ♥ ♬ ⌨

alt url seldomlogical.com/mtp.html

contact Peter Renshaw

← HOME ↖ UP TOP ↑