I'm working a web application, which is MVC 5 + Angular JS hybrid. There is no authentication in the web app and an anonymous user can come and ask for price for certain services. To get the price the user needs to answer some questions spread across few pages. Here is the flow of app.
User clicks button to get price
A unique URI the request is generated and user is redirect to the questions page
User answers questions and user submits the answers. The questions are spread across multiple pages navigated through angular routing. The answers are saved back to server on page navigation.
Once, the user submits the answers, the system (server) generate the price and display it to user.
Currently, if the user has bookmarked the URI, he can come back after days and continue from where he left. I want to prevent this behaviour.
What are the different options do I have in MVC? I can think of following:
Using
HttpCookie
with expiration timeSave the last access time in DB and validate if the user has come within a stipulated time frame?
I would like to avoid HttpSession
. I'm inclined towards using HttpCookie
since it looks to be the simplest option.
If we go with
HttpCookie
option, are there any side effect that I need to keep in mind?Are there any other alternative within MVC I can look for?