473,698 Members | 2,149 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Web login problem

guy
I am not a web developer so this is probably easy!
in a web app i have a login page
if a user logs in, does stuff, logs out - which takes them back to the login
page - how do i stop a new user hitting 'back' from the login page and seeing
the last page the previous user was looking at (this could be any page in the
application)?

Sep 12 '06 #1
5 1403
When a user logs in to your web app, it sets a cookie to know
who's logged in. When user logs out the cookie is disposed.
One more thing to do is not to store pages in browser cache.

If your web app is written is ASP, you can set the precise date
and time when a cached page expires:
Response.Expire sAbsolute = Now() - 1

Or specify the time in minutes before a cached page expires:
Response.Expire s = 0
Setting this value to zero reloads page every time.

In plain HTML tell the browser not to cache page and immediately
expire page:
<HTML>
<HEAD>
<TITLE>---</TITLE>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
</HEAD>

Similar techniques can be used in ASP.NET and PHP.

- Timo
"guy" <gu*@discussion s.microsoft.com wrote in message
news:DD******** *************** ***********@mic rosoft.com...
>I am not a web developer so this is probably easy!
in a web app i have a login page
if a user logs in, does stuff, logs out - which takes them back to the
login
page - how do i stop a new user hitting 'back' from the login page and
seeing
the last page the previous user was looking at (this could be any page in
the
application)?

Sep 12 '06 #2
guy
Thanks Timo, the problem is that most of the time i do not want the page to
be reloaded each time, i want back and forward functionality to work.

if loged out the application will force a log in when the operator tries to
do anything within the application (this works), but when in the login page
ONLY i do not want them to be able to go 'back' and see the previous page.

Correct me if i am wrong but setting Response.Expire s would have to be done
in every page, and this would not be waht i want

thanks

guy
"Timo" wrote:
When a user logs in to your web app, it sets a cookie to know
who's logged in. When user logs out the cookie is disposed.
One more thing to do is not to store pages in browser cache.

If your web app is written is ASP, you can set the precise date
and time when a cached page expires:
Response.Expire sAbsolute = Now() - 1

Or specify the time in minutes before a cached page expires:
Response.Expire s = 0
Setting this value to zero reloads page every time.

In plain HTML tell the browser not to cache page and immediately
expire page:
<HTML>
<HEAD>
<TITLE>---</TITLE>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
</HEAD>

Similar techniques can be used in ASP.NET and PHP.

- Timo
"guy" <gu*@discussion s.microsoft.com wrote in message
news:DD******** *************** ***********@mic rosoft.com...
I am not a web developer so this is probably easy!
in a web app i have a login page
if a user logs in, does stuff, logs out - which takes them back to the
login
page - how do i stop a new user hitting 'back' from the login page and
seeing
the last page the previous user was looking at (this could be any page in
the
application)?


Sep 12 '06 #3
guy
Solved ...
When the user hits the logout button - go to a page that redirects them to
the Login page, this means that if they hit Back from the Login page they go
to athe page that redirects them back to the Login

"guy" wrote:
Thanks Timo, the problem is that most of the time i do not want the page to
be reloaded each time, i want back and forward functionality to work.

if loged out the application will force a log in when the operator tries to
do anything within the application (this works), but when in the login page
ONLY i do not want them to be able to go 'back' and see the previous page.

Correct me if i am wrong but setting Response.Expire s would have to be done
in every page, and this would not be waht i want

thanks

guy
"Timo" wrote:
When a user logs in to your web app, it sets a cookie to know
who's logged in. When user logs out the cookie is disposed.
One more thing to do is not to store pages in browser cache.

If your web app is written is ASP, you can set the precise date
and time when a cached page expires:
Response.Expire sAbsolute = Now() - 1

Or specify the time in minutes before a cached page expires:
Response.Expire s = 0
Setting this value to zero reloads page every time.

In plain HTML tell the browser not to cache page and immediately
expire page:
<HTML>
<HEAD>
<TITLE>---</TITLE>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
</HEAD>

Similar techniques can be used in ASP.NET and PHP.

- Timo
"guy" <gu*@discussion s.microsoft.com wrote in message
news:DD******** *************** ***********@mic rosoft.com...
>I am not a web developer so this is probably easy!
in a web app i have a login page
if a user logs in, does stuff, logs out - which takes them back to the
login
page - how do i stop a new user hitting 'back' from the login page and
seeing
the last page the previous user was looking at (this could be any page in
the
application)?
>
Sep 12 '06 #4
Hello guy,
HAHA. I absolutely HATE companies that do that. Your so-caled colution
will work only if the user isnt some twitchy 14 yr old that can hit the button
faster than the redirect can happen.. or if the user is too stoopid to notice
the drop down arrow next to the back button.

-Boo
Solved ...
When the user hits the logout button - go to a page that redirects
them to
the Login page, this means that if they hit Back from the Login page
they go
to athe page that redirects them back to the Login
"guy" wrote:
>Thanks Timo, the problem is that most of the time i do not want the
page to be reloaded each time, i want back and forward functionality
to work.

if loged out the application will force a log in when the operator
tries to do anything within the application (this works), but when in
the login page ONLY i do not want them to be able to go 'back' and
see the previous page.

Correct me if i am wrong but setting Response.Expire s would have to
be done in every page, and this would not be waht i want

thanks

guy
"Timo" wrote:
>>When a user logs in to your web app, it sets a cookie to know who's
logged in. When user logs out the cookie is disposed. One more thing
to do is not to store pages in browser cache.

If your web app is written is ASP, you can set the precise date
and time when a cached page expires:
Response.Expi resAbsolute = Now() - 1
Or specify the time in minutes before a cached page expires:
Response.Expi res = 0
Setting this value to zero reloads page every time.
In plain HTML tell the browser not to cache page and immediately
expire page:
<HTML>
<HEAD>
<TITLE>---</TITLE>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
</HEAD>
Similar techniques can be used in ASP.NET and PHP.

- Timo

"guy" <gu*@discussion s.microsoft.com wrote in message
news:DD****** *************** *************@m icrosoft.com...

I am not a web developer so this is probably easy!
in a web app i have a login page
if a user logs in, does stuff, logs out - which takes them back to
the
login
page - how do i stop a new user hitting 'back' from the login page
and
seeing
the last page the previous user was looking at (this could be any
page in
the
application) ?

Sep 13 '06 #5
guy


"GhostInAK" wrote:
Hello guy,
HAHA. I absolutely HATE companies that do that. Your so-caled colution
will work only if the user isnt some twitchy 14 yr old that can hit the button
faster than the redirect can happen.. or if the user is too stoopid to notice
the drop down arrow next to the back button.

-Boo
Solved ...
When the user hits the logout button - go to a page that redirects
them to
the Login page, this means that if they hit Back from the Login page
they go
to athe page that redirects them back to the Login
"guy" wrote:
Thanks Timo, the problem is that most of the time i do not want the
page to be reloaded each time, i want back and forward functionality
to work.

if loged out the application will force a log in when the operator
tries to do anything within the application (this works), but when in
the login page ONLY i do not want them to be able to go 'back' and
see the previous page.

Correct me if i am wrong but setting Response.Expire s would have to
be done in every page, and this would not be waht i want

thanks

guy
"Timo" wrote:
When a user logs in to your web app, it sets a cookie to know who's
logged in. When user logs out the cookie is disposed. One more thing
to do is not to store pages in browser cache.

If your web app is written is ASP, you can set the precise date
and time when a cached page expires:
Response.Expir esAbsolute = Now() - 1
Or specify the time in minutes before a cached page expires:
Response.Expir es = 0
Setting this value to zero reloads page every time.
In plain HTML tell the browser not to cache page and immediately
expire page:
<HTML>
<HEAD>
<TITLE>---</TITLE>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
</HEAD>
Similar techniques can be used in ASP.NET and PHP.

- Timo

"guy" <gu*@discussion s.microsoft.com wrote in message
news:DD******* *************** ************@mi crosoft.com...

I am not a web developer so this is probably easy!
in a web app i have a login page
if a user logs in, does stuff, logs out - which takes them back to
the
login
page - how do i stop a new user hitting 'back' from the login page
and
seeing
the last page the previous user was looking at (this could be any
page in
the
application )?


and the answer is?
Sep 14 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2209
by: Sniffer-Dog | last post by:
Hi I just wondered if anyone can spot anything wrong with the following? I have now added the session_start(); as the first command in the code to all the pages needing it. When I click on a webpage that is restricted, it takes me to the login page fine. When I login though instead of taking me to the page I clicked previous to that, it always takes me to the index file, and when I try to then click on the page I wanted to go to, it...
5
2967
by: Simon | last post by:
Hi, I have a Login.php page that logs the user in and out. I has two forms within the page, (depending on what we are trying to do), either one to log in or out. The form calls itself using a post method and either logs the user in our out given the information from the form. but every pages use sessions and cookies, if the user is successfully logged in then the cookies and session values are updated, (as well as MySQL).
1
2141
by: John Davis | last post by:
I put a little login (username and password textfields) in a web page, and once the user able to login, I want the username and password textfields will disappear, and replace with text " has Login!]" in the same position. My question is how to make the username and password textfields disappear and replace with " has Login!]" in the same position? This is the code I have done so far, but it has another problem: Even I first check if...
0
1787
by: Mike | last post by:
I can not figure out what is going on here. I hope somebody can please help!!! I've got an intranet ASP3 application running on a Win2k server. This application requires a login, so the user must first go to the login.asp page before accessing any other .asp page. I have set up a redirection method so that if a user pastes a URL to an internal .asp page, I store the URL in a session variable, then I direct them to the login page. After...
1
5502
by: Wayne Smith | last post by:
Applies to: Microsoft FrontPage 2000, Microsoft Access 2000, IIS 5.0 Operating System: Microsoft Windows 2000 Professional I am trying to protect a portion of a web site by allowing users to register a username and password & then login with those details, but so far I am having only marginal success. I am far from an expert on ASP programming, indeed the code I am using comes from "Sams Teach Yourself E-Commerce Programming with ASP" but it...
2
12688
by: Tom Loach | last post by:
Our system administrator set up an NT server group in order to allow our users to login to our application via https to our sql server. The group appears as a User in SQL Server when you look at it in Enterprise Manager. That said, I can not see the users associated with the group from Enterprise Manager, but know they can login to the database. The problem is this. When we login via the web we get access to the database without...
2
2228
by: Rujuta Gandhi | last post by:
Hi All, I am facing a very crucial problem. Im developing a web application using .net studio 2005(beta). I want my Login.aspx page to be secured(https) for encrypted login information transfer. I modified web.config and properties of Login page from IIS server. And now when ever the execution is redirected to Login.aspx It is having https as its protocol.
1
3067
by: xcelmind | last post by:
Hello Dev. Guru, I want to at this time introduce myself. I am Stanley Ojadovwa by name. I’m a freelance and a newbie in web application development. I’m currently using ASP as my application server technology with Microsoft access as my database source. Just as I have introduced myself, I’m a newbie in web application development. I’m currently working on an application that will allow
4
2037
by: RN1 | last post by:
I am working on WinXP Pro SP3, .NET 2.0 & SQL Server 2005 (Windows Authentication). When I run a ASPX page that connects to SQL Server, the following error gets generated: Login failed for user 'RON\ASPNET' where RON is my machine name. I came across a few posts which suggested adding RON\ASPNET as a User in SQL Server Management Studio Express (under Security--->Logins node). I did so but that didn't resolve the problem.
10
4813
by: DavidPr | last post by:
When I logout as one user and log in under a different user, it opens with the last user's information. User 1 - Unsername: Davey Jones User 2 - Unsername: David Smith I log out from Davey Jones, then login as David Smith the Welcome message below will show "Welcome Davey". And it will be Davey's information that is accessible - not David Smith's. So something is amiss but I don't know what. (BTW, this login script is based on the...
0
8674
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8604
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9028
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8895
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7728
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4369
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3046
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.