Hi ...

I'm doing 1 web-system, where login page in .jsp but other functional page in .html where I use javascript to do function. So if user knows any other html page's url then they can browse directly any of those page. But I've to prevent them & send to login page if they try to browse with out login. Very sad I can't do it :icon_mad:

Please any1 help me to get this solution.

Really it's very urgent :sad:

Thanks in advance

Recommended Answers

use session

Jump to Post

All 2 Replies

Actually, you should do the check on the server side. The reason is that JavaScript can be disabled and that would allow users to go directly to the page anyway. What you need to do is checking for log-in before you render the page. If the user has not logged in yet, send the user to another page from there.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.