Terms explained: Visits, Page views, Sessions, Requests, Hits

Terms explained: Visits, Page views, Sessions, Requests, Hits
Image © Juja Schneider

When discussing possible load test setups with our clients, we usually need to refer to these key terms: visits, sessions, requests, hits, page impressions, and page views. Actually, we don’t need to discuss all of them, but some are occasionally brought up by the customer, some are requested by us, depending on the context (and complex enough to be discussed in a separate article).

Many clients of ours have told us that it’s sometimes hard not to confuse these terms as they seem to denote the exact same thing. Today’s article is thus meant to give you an overview on their definition and help you distinguish them. Here it comes.

Visits

Basically, a visit occurs when you send a request to a server and, as a response, the website you requested is displayed. The display of the page is what we call the page view (which is covered in more detail below). Take, for instance, www.amazon.com: you enter the URL, that is you send a request to that server. As a result, you arrive on the shop’s homepage. In doing so, you generate a visit and the website owner now knows that someone visited their site. Accordingly, a visit consists of at least one page view. Typically, though, you’ll decide to browse through the shop, thus producing further page views with every single one of them adding up to your visit regardless of what you actually do while staying on the site.

Your visit ends when you become inactive for whatever reason, for example, when you stop clicking links or when you overall close your browser. The server then deletes or deactivates the data that has been collected during your visit. Depending on the web application, the time period before this actually happens varies from 30 minutes up to 24 hours (see below for more details). Compared to the real world, a virtual visit is therefore not much different from a visit in an actual store: regardless of how you spend your time in there, the store owner will consider you a visitor and they will eventually forget about you when you decide to leave their store for a longer period of time.

A visit defines three metrics that are important for us to know: the visit duration, the number of page views per unit of time, and the time period between two page views (thinktime). By the way, the Internet is crowded by an insane number of machines that also generate visits and that cause statistics to get messed up. There are a couple of technical measures trying to filter out these irrelevant visits. Let me know if you’re interested in how that can be accomplished and I’ll talk about it in another article.

Page view

As mentioned above already, a page view, or page impression, is the display of a website you trigger by sending a request to a server. It was not long ago that one request was sufficient for the page you requested to be displayed; via further requests, the browser then added images, CSS, and Javascript. In the modern web, the page view term is used in broader contexts as AJAX and recent user concepts don’t exchange complete websites but only modify small parts anymore. Thus, a page view is actually an interaction or action most of the time.

But let’s stick with the old-fashioned page view for now. It gets initiated by a request and terminated by the response from the server. This sequence of events is also referred to as hit. A site may contain other elements, such as images and CSS. Each of these elements is again processed by a request/response sequence and leads to another hit. Thus, a page view is made up of an HTML component and many embedded elements with each element and the HTML component causing further hits. Important metrics are, for instance: page load time, page size, and view time, namely the time period until the next click.

Hit is often the business term for a request that, in turn, is the technical term for a single data transfer.

To sum this up: A visit consists of one or more page views and has a certain duration while a page view has a runtime and consists of elements referred to as request or hit.

Sessions

Now, how does a session differ from a visit? In simple terms, a session is the technical picture behind a visit. The software you take advantage of while browsing through a webshop has to remember which requests belong together so that functionalities such as a login or a cart can actually do the things they’re supposed to do.

Sessions consist of data that summarize certain information concerning your visit which is why they are also called session information. Usually, these information have a limited lifetime as they are subject to a session-timeout. In most cases, this time-out amounts to something between 30 minutes to 2 hours. As soon as your visit ends, time is ticking down and, upon reaching the session-timeout, all data is deleted. If you continue your visit before the time has elapsed, the countdown resets to 0. To illustrate this with our real-world example, imagine you decided to buy something in the store you walked into (visited) but at the register you suddenly realize you didn’t bring any money. You can leave your cart at the register for a while to go get some cash but if you don’t return in time, the cashier will assume you’re not coming back and empty your cart.

Technically speaking, the number of sessions equals the number of visits. Due to business-related aspects, however, visits are counted differently than sessions so that the number of visits is usually lower than the number of sessions per unit of time.

Summary

In a few words:

  • Visits mostly equal sessions, where session is the technical term and visit is the business term. A visit consists of at least on page view.
  • Hits and requests are the same, request is the technical, hit is the business term.
  • A page view is a single complete page delivered. At least one request is needed to serve it, mostly many requests are fired to assemble a page. Nowadays, page views tend to be interactions because often full pages aren’t loaded anymore; instead, only pieces are dynamically changed (the famous Ajax magic).

Confused? Feel free to ask!

2 thoughts on “Terms explained: Visits, Page views, Sessions, Requests, Hits”

Comments are closed.