Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Session cacheing question

Status
Not open for further replies.

awingnut

Programmer
Feb 24, 2003
759
US
I hope I can ask this question clearly. I know there are web sites I've visited that do this (I don't know what it is called so I don't know what keywords to search on).

I'm looking for documentation on how to accomplish the following:

I need to start a session during which a user can complete forms and navigate between pages and forms using the forward and backward buttons and/or links. However, once the user ends the session (timeout, exit browser, or log out) the history of that session is deleted and/or expired. This is so that the previously used pages cannot be accessed any more via history or the back button.

Can someone point me in the right direction and also tell me what this type of session management is called? TIA.
 
If your session is expired, why would anyone be able to revisit those pages? Are you using sessions in your pages?

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
I think you are asking my question except you are asking with pre-requisite knowledge I don't have, yet.

Perhaps because I used the word 'session', you made an assumption about my understanding.

To answer your first question: I don't know what would stop it. The back button is the back button.

To answer the second question: No, I am assuming I need to do this with sessions but beyond that I'm a novice.
 
see thread434-1036995 for some hints on where to get started. (I'm assuming you're using php).

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
Thanks for the reference. However, I think that thread is starting in the middle of what I need rather then at the beginning. It is clear I don't understand sessions because I thought it was a browser function that handled expired pages based on the HTML code. While some pages may be PHP, many are not. Since PHP is server-side rather then client side I am not understanding how that can cause the browser to expire pages. Anyway I guess I am looking for a good session management tutorial.
 
Maybe you could just set the page to no-cache and the expired to -1 and whatnot.
 
If you have html pages that you don't want cached, you may want to follow sheco's suggestion. If you want to control it with php, there was a link in the other thread to php session tutorial

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
I'm not sure PHP can do what I want (this is why I was concerned about asking the question clearly). Once the browser has the page (regardless of whether or not it was produced by PHP) it is in the browser's history (I don't think no-cache effects that but maybe expired does). While trying to use that page can be stopped I want to prevent that page from even being displayed (back button) once the session ends.
 
If it's plain html, what's to prevent the user from simply bookmarking it?
I'd be willing to bet that the examples you ask about in your original post are scripted pages and thus will not be found if you try to enter / return without a session.

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
I don't know. Isn't bookmarking just saving the URL? I guess my question would be what prevents a 'save as' of the page. I guess neither of those are major concerns, the real issue is using the back button or forward button to navigate between pages after the 'sesssion' ends.

So am I hearing that there really is no way to 'expire' pages without using PHP. Is that correct?
 
As far as I know (and the depths of what I don't know are limitless), you can only do this with one of the server-side scripting languages (including php).

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top