Jump to content


Recommended Posts

SET-UP:  When you open to the main page of my website two consecutive splash panels appear.  The second of these leads you to a form with a reward for its completion.  If the form is successfully completed, a confirmation page appears that congratulates you on successful completion of the form and invites you to return to the main page.  Under normal conditions an if-statement whose condition is

performance.navigation.type === 0

suppresses the splash panels from reoccurring when the main page is refreshed.  When the main page is reopened from the confirmation page, however, this suppression technique fails.  

QUESTION: How would you recommend that I suppress the reoccurrence of the splash panels when the user seeks to access my site's main page using the link provided on the confirmation page?  Mind you, I wish to retain the current suppression of the main page in the event that the users seeks to refresh the page!  

For example, is there a way that I could fool the browser into thinking that the main page is being refreshed when it is opened from the confirmation page?

Edited by iwato
Link to comment
Share on other sites

Store the completed state of the form in the session, then check whether the session value is set before showing the panel. You can do this in Javascript with localStorage, sessionStorage or cookies. You can do it in PHP using sessions or cookies.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...