When to look at the source code

While conducting online research I rarely look at the source code behind a web page, but there are a few occasions when I have found it quite useful. I thought I would write a post on what those are.

Whenever you look at a webpage, there are lines and lines of code behind it. Your web browser looks at the code and transforms it into beautiful website. But if you want to peek at the code that is quite possible and easy to do. How you access it is a bit different in each web browser, but all of them let you do it.

Why you would want to look at code is a different matter altogether.

Mostly it is useless to you as a researcher, but on a few occasions things appear in the code that don’t get displayed on the website it self. But of course checking every web page for these little tid bits of information would be a ridiculous waste of time.

The best way I have found to use source code is pressing Ctrl+F or ⌘-F (Mac) and using the find bar to search for the @ symbols. This lets me quickly find all the email addresses within the code. This is useful because on occasion there are email addresses in the code that don’t appear on the webpage itself.

A good example of this is with contact information boxes.  Some websites don’t give out their own email address, but instead give you a form to fill in, and ask you to press send. Sometimes, but not always, the email address that your message goes to is included in the source code. If a web developer wants to obscure the email address they certainly can, but sometimes that level of security is not the developers chief concern. I would say that roughly 1 in 8 of these message boxes have the email address they are associated within the source code. Although it tends to be that lower-budget sites are more likely to have the email address in the code than higher-budget ones.

When I come across a message box or an online form and I am curious who it goes to, I will spend the ten or twenty seconds it takes to check the source code for the email addresses. I have also seen email addresses included in the source code when the addresses are associated with an embedded tool, such as a google calendar.

Here is an example from the webpage of the Australian animal rights group Animal Rights Advocates Inc.
It is hard to see because of the text colours, but at the top of this image an email address is provided, info[at]ara.org.au. However if you look in the source code you can find that the online form sends the information to another email address altogether, and that might shed light on who is behind the website, beyond what is clearly visible when you look at ths site.
The other way that I use source code is when I am trying to cut and paste URLs and email addresses without opening a link. A page can include text that is hyperlinked, and when you scroll over it shows the email address or URL that it links to, but to cut and paste the link you then have to open a new window. So if I know I am cutting and pasting the address of numerous links, I open up the source code instead.
My understanding of HTML and coding is quite limited, and I am curious if there are other ways in which the source code can be useful to researchers. If you know of any please post them below.
This is hardly the research trick you will use every day, but it is one that is worth having in your tool box, for when the right occasion arises.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s