Pagination Techniques

March 15, 2012

Many of the applications, sites and directories that we build have a common component to them, pagination. Pagination is a technique of showing content over many pages. A typical example would be a list of products on an e-commerce site, but spread out 12 on a page. There are many reasons and approaches to doing pagination. In this post we aim to help you understand the types of pagination and the options that you have on your site.

Reasons to do Pagination

There is a large number of reasons to do pagination. One is that it may take the server a long time to load the whole dataset and the user will not want to wait. So you load a small subset of the data and display that to the user.  Another is to have acceptable scrolling. If the page is huge, the scroll bar may so touchy, that even moving the scrollbar a small amount renders a large movement in the content area. A third reason is to make it easier on the browser. If a page is very very large, it can make the browser get very slow, due to having to put so many things in the memory.

Then again, lots of times it’s okay to show all of the items, as long as it’s fast and renders an acceptable user experience. It’s frequently getting more acceptable to the user a large dataset, due to larger screens and faster computers.

Types of Pagination

Enumerated pagination is about the most common. If you have used google, you have seen this type of pagination. The pages are labeled in sequential order. Below is a picture of it.

Enumerated Pagination

A newer type of pagination, is called endless scrolling. How it works, is when you get to the end of your current page, more stuff is inserted into the page making it larger. This is commonly used to get the initial page to load quickly. It’s hard to show a screen shot of this, but I am sure that you have seen it in use places like twitter and facebook. You can see it in action over at NEScom’s Hire Me application. Go to hireme.nescom.edu/search, and as you scroll to the bottom of the page, you will see new candidates get added to the page automatically.

SEO and Pagination

Google (and others) generally will treat each page within the pagination set as a separate entity. That was until recently. Lately, they have been some developments in HTML5 and crawling styles. If the page is using proper markup convention, search engines will now understand when they see a paginated set and have really improved how they render those for people searching for your information on Google and the like.

If you are using endless scrolling, special care needs to be taken to ensure that search engines can find the results properly. Things like an xml sitemap become critical.

avatar

Alan has been creating websites since CompuServe was huge. Today he still is developing websites using technologies such as CSS3, HTML5, jQuery and CakePHP.

Comments

No comments yet.

Leave a comment