webpage: conditional transfer to another page

Posted on 2014-02-08
Last Modified: 2014-03-07
I would like to show a button on a webpage ONLY if some particular page as already been visited. Is there a way to do this kind of "conditional" linking with HTML, CSS, or JavaScript?

For example, I have pages A and B. I would like to show a button on page A then when clicked takes me to page B, but ONLY if page B has already been visited. If page B has NOT been visited, I don't want to show the button on page A.

Thanks for any help.

Question by:karnac2020
  • 2
  • 2
  • 2

Expert Comment

ID: 39844935
But how the are going to visit page b if the button only appears if they have visited page b? Unless they get to page b by direct link?

Expert Comment

ID: 39844940
Perhaps using cookies or user accounts ( wich require some database)

Author Comment

ID: 39845263
They get to page B via another link or path. The current website is built with ASP.NET so it uses a MSSQL database.
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

LVL 26

Accepted Solution

skullnobrains earned 500 total points
ID: 39892901


the above requires that the exact same url was visited and is easy to bypass if the users want to

you can devise similar solutions is js/jquery

if you need something more robust, you'll have to do it server side : identify which clients visited siteB and store the info in a database. read the db when generating page A and include the button if needed.

Author Closing Comment

ID: 39913127
nice solution
LVL 26

Expert Comment

ID: 39913460
thanks. beware this is trivial to bypass for many users

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Host pages 5 25
Run time Error 4 34
Need script to search multiple files in one drive 13 35
Master Content Pages, WebForms, and Session Variables 1 34
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
The viewer will learn how to dynamically set the form action using jQuery.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now