473,387 Members | 1,420 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 1385
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.ExpiresAbsolute = Now() - 1

Or specify the time in minutes before a cached page expires:
Response.Expires = 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*@discussions.microsoft.comwrote in message
news:DD**********************************@microsof t.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.Expires 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.ExpiresAbsolute = Now() - 1

Or specify the time in minutes before a cached page expires:
Response.Expires = 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*@discussions.microsoft.comwrote in message
news:DD**********************************@microsof t.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.Expires 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.ExpiresAbsolute = Now() - 1

Or specify the time in minutes before a cached page expires:
Response.Expires = 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*@discussions.microsoft.comwrote in message
news:DD**********************************@microsof t.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.Expires 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.ExpiresAbsolute = Now() - 1
Or specify the time in minutes before a cached page expires:
Response.Expires = 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*@discussions.microsoft.comwrote in message
news:DD**********************************@micros oft.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.Expires 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.ExpiresAbsolute = Now() - 1
Or specify the time in minutes before a cached page expires:
Response.Expires = 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*@discussions.microsoft.comwrote in message
news:DD**********************************@microso ft.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
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...
5
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...
1
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...
0
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...
1
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...
2
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...
2
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...
1
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...
4
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...
10
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.