May 18, 2011 - Webcomic Bookmark Tutorial

I recently added a 'bookmark' feature to my site. I'm not sure what people will think of it, but hopefully it is out of the way enough not to be annoying. Since it is not something that seems very common, I thought I would write a short post explaining how it works. The goal is to make a little popup for regular visitors of the site, giving a quick link to pick up reading where they left off.



In order not to annoy people all the time, the bookmark only tracks the number of new comics between each visit. So each time you visit the website, the bookmark assumes that you will read all the new comics. This prevents lots of popups for people that don't really care about sequential reading and just want to jump around. The steps that I take to do this are:

  • The first time someone visits Caveman Agent I set a cookie with the id of the newest comic.
  • The next time the same person visits Caveman Agent, if new comics have been posted since the last visit a popup will appear giving the option to resume reading from the last location.
  • Re-set the cookie to the newest comic. This assumes that people will start reading where they left off, then read all the way through to the newest comic. I may change this later, but my thinking now is to have as few popups as possible versus trying to force visitors to read the comic in order.
So that is the idea. Here is the php (disclaimer: I'm not a php programmer):

1
2
3
4
5
6
7
8
9
10
11
12
13
  if( isset($_COOKIE['last_comic']) ) {
     $last_comic = $_COOKIE['last_comic'];

     if ( $last_comic < $newest_comic ) {
        echo "Click here to pick up reading where you left off.";
        $expire = 60 * 60 * 24 * 365 + time();
        setcookie('last_comic', $newest_comic, $expire);
     }
  }
  else {
     $expire = 60 * 60 * 24 * 365 + time();
     setcookie('last_comic', $current_comic, $expire);
  }


If the visitor has never been to the site before (or the cookie has expired after a year), on line 12 a new cookie is set with the id of the current comic. The id would be 1, 2, 3...22, 23 etc. When this visitor returns again, on line 1 we will see that they have the cookie set. Then, if the value of the cookie (the newest comic the last time the user visited) is less than the current newest comic (ie I've posted more comics since the last time they visited), then the popup is displayed.

The popup content is shown in line 5. I've taken out the html and css that make up my popup, and just left a simple message, but the idea is the same. After displaying the popup, I reset the cookie to the newest comic. Again, this assumes that the visitor will start where they left off, then read all the way to the current comic. I might change this, but I think it makes sense for now.

Since this is new, you probably won't notice it until I post some more comics! If you really want to try it out, clear your cookes, then go directly to any comic EXCEPT for the latest. This one for example. Then click 'home'. You should see the popup.

This is just an experiment, feel free to leave feedback.

Back to blog




Discuss

Dominic - August 05, 2011 - Reply to this comment
I think this is a brilliant idea, and need to be implemented across every single webcomic in existence...with one change. Instead of resetting the cookie to the newest webcomic, allow the user to manually reset it to the last comic read.
My logic is that for those webcomics with a large archive, readers may want to read in multiple sessions without necessarily reading all the way to the newest strip. For example, the archives of Sluggy Freelance are huge and go back years. If I start reading from strip 1, there's no way I'd be able to read up to the current strip in one sitting. I'd like to be able to return to a previously bookmarked strip and pick up reading in another session.
I've read hundreds of different webcomics, and only seen anything like this implemented on two of them. I think if it were put into widespread usage by a service like Keenspot, it could boost webcomics readership across the board.

hovvit - August 08, 2011 - Reply to this comment
Thanks for the comments. I like your idea... I think that something like you suggest would be needed if, like you say, there is a large archive.

Since I only have a couple dozen comics, it's not so much of a problem for me. But it will be cool to play with the bookmark as I draw more comics. I really appreciate the feedback, as I hadn't seen a bookmark like this before so it was kind of an experiment.

HipolitoIvan - October 03, 2011 - Reply to this comment
You d better create a small niche products or products can also be found in the stores.

Post a comment
Name: (Optional)
Website: (Optional)
Email*: (Optional, or select from the right)          
 * Your email address is used to display your gravatar. Your email address is not saved.
Comment:

    Post links with the format: [url]%name%