Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hello all, I want to put a session on my page using JavaScript to confirm the user is coming from my other page, just like a PHP session, please help me. I have a webpage www.mydomain.com on this page there is a link for www.mydomain.com/user, I don't want www.mydomain.com/user get opened directly but from original webpage www.mydomain.com
Thanks.
Posted
Comments
Sergey Alexandrovich Kryukov 1-Jun-15 16:59pm    
What does it mean, "put session"? What exactly are you trying to achieve?
—SA
Tahir Subhani 2-Jun-15 10:00am    
I mean as we put session in PHP to link pages navigation but i don't know how to do this in Java and which commands are used. Thanks
Sergey Alexandrovich Kryukov 2-Jun-15 10:23am    
No, PHP has session control because PHP is executed on server side. But JavaScript is all on the client side. So, I don's see how your question may make any sense. Or are your talking about some server-side JavaScript technology?
—SA
Tahir Subhani 2-Jun-15 9:58am    
Yes, you are right but how to do this in Java? I am very new to it. thanks.
kashif Atiq 2-Jun-15 2:04am    
Your Question is not clear. in header you want to know how to save whole session in java script. but in detail you want to stop users from directly accessing a user page.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900