asp.net mvc - Redirect visitors first time visiting site -


so need redirect visitors first time enter site, regardless entrypoint site.

i have implemented global filter search cookie , if cookie doesn't exist, create cookie , redirect desired page.

it seems expensive way every action first check cookie. there better way achieve this?

thanks!

checking presence of cookie won't expensive operation run on every action. that's correct way implement feature , won't hurt performance of site.

as alternative method, if client browsers support html5 local storage use javascript store value in local storage if user has visited site. then, once again, using javascript, on every page check presence of value in local storage , if not present redirect user landing page.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -