Force view of page A before viewing page B or C (prerequisite page A)

We have a need to require that a given page A be viewed before page B or C can be viewed. That is page A is a prerequisite for pages B and C.

I’m trying to figure out the best way to accomplish this without shutting anyone out from being able to ever get to page B. I wanted to run my research by the forum for anything I might have missed.

The three methods I can think of are referer field, session cookies or requiring a password.

Checking referring page address
Pro:

  • Ensures that anyone viewing a protected page has just viewed the disclaimer

Con:

  • Doesn’t work in a small number of browsers; visitors using such browsers won’t be able to view the protected content
  • Some types of servers block this information; this is out of the visitor’s control
  • Some internet security programs block this information
  • May conflict with new “Do Not Track” browser settings

Cookie
Pro

  • Supported on all browsers

Cons

  • Some people choose to block cookies; they will have to enable cookies to view the protected pages
  • If two people share a computer login, one will have seen the disclaimer page and the other won’t have (but that’s also true if someone navigates to the restricted page and then shows it to someone else)
  • May conflict with new “Do Not Track” browser settings

Password
Pro

  • Supported on all browsers

Con

  • Annoying to visitors

Thoughts?

The option I’d use would be to create a session and set a session variable on the first page that the second page reads in order to confirm that the first page was in fact visited. The session id will be either stored in a cookie or passed in the querystring but either way the actual value that the first page sets will be kept on the server and never passed to the browser.

The referer field is user enterable and can be disabled either in the firewall or via browser privacy settings.

If cookies are used then they too are under visitor control - whereas a session can still work with cookies disabled.

If you use a password then you’d need to pass a session between the pages anyway in order to avoid them having to log in on both pages.[URL=“http://www.sitepoint.com/forums/”]