If you’re reading this blog, you’re probably someone who uses the Web just about every day. Most people I know who have a computer at home got that computer in order to send email and surf the Web. And most of what I’m studying at school has to do with the web one way or another, whether it’s building a database that powers a website, handling networks, or even just using the web to collaborate on a project.
There is quite a bit going on behind the scenes when you go to a site like Amazon. Understanding what’s going on under the hood can help you recognize good and bad website design, decide what browser to use, know what browser settings you would like to tweek, and figure out where to start looking when something goes wrong. All without writing a single line of code.
First, we need a little bit of background that will set us up for the fun and useful stuff. Let’s dig in!
When you opened up the web page that has this blog post, your computer asked another computer to send it a bunch of text that’s stored in a file on computers owned by my web host. Your browser got the file, decoded the special symbols (markup), and decided if it needed to ask for more files. It almost always will need more files, because most websites today contain images (which are separate files) and use separate files called style sheets to tell your browser that I’d like you to see the text be a certain font in a certain size, in a white box on a blue background.
Text files seem like a silly way to send something that seems so visual, like the web. But there are really good reasons why it’s done this way. Sending the words in this post as text takes up a lot less space than sending it as a picture. Why does that matter? When it comes to computers, size means time and money. Back when HTML (the markup used to send you this web page) was invented, the internet was slow. I bought my first modem about 5 years later, and it was really speedy for its time — it would have taken me over 5 minutes to download that image of the web page. Sure, the internet is a lot faster now, but it wouldn’t be much fun to wait 4 or 5 times longer for every page to load.
Money also comes into it. I pay my web host based on how much data they send out and how much data I ask them to store. If all the files for this website are images instead of text, I wind up paying a lot more. So much more that I might not write this blog. Multiply that by a million people and you suddenly find a lot less content on the internet. Your ISP may also have to pay other ISPs to connect to them and request data, so your monthly internet bill goes up, too. And if you’re viewing this on a mobile phone (which is how most of the world surfs the web), too much data puts you over your cap, and you pay dearly for that larger file size.
It’s not just time and money. People with visual disabilities rely on the web being mostly text so their screen readers can make sense of what I’m saying here. People who don’t read English can put this text into translation sites and be able to use it. And having the page be based on text is what lets you still read the page on your mobile phone or any time you resize your browser window. (This is assuming the web designer followed good design practices. More on that in a future post.)
What can you do with this knowledge? Not much, yet. But this will get us to stuff you can use.