How To Clear Browser History

Feb 15, 2011

I want to clear the user's browser history, after a certain task is completed....

Or if it is not possible, then at least i want to prevent the user to go back by clicking the browser back button....

View 7 Replies


Clear Text Field History?

I have a text field in which I'm supposed to enter the answer for the security question which is needed in case I forgot my password e.g (who is your best childhood friend?).. Now the problem is that when I enter a value in the first time, the second time I find a drop down box which contains my previous value, and of course this is a security breach. So isn't there someway to disable the history of this text field but besides it shouldn't repeat the same action in the future?

View 1 Replies

Clear A Html Form Revisiting Via History?

Implemented a sendmail in PHP called from a html page with a form.It requires filling some textfields, then pressing the submit button causing the mail to be sent.Now I need this form to be cleared on successful mail transmission.Internet Explorer(or other)saves all field values when moving on to another page.This makes it easy to go back in browser history and resend the mail.What I want is that on a succesful transmission of the mail the form cache(or whatever)is cleared.This must be done in the PHP page called.

View 6 Replies

Clear History Of Visited Links On Web Pages Using Cookies

Usually the preferences of a browser can be set to memorize visited links for some time. But how can I override this using PHP?

On my site the visitor clicks on a link and the link changes its color. But I'd like to make it happen that the visitor will have this effect ONLY during one session. So, that the next day all will look "nice and fresh" again.

I've googled around but cannot find the answer to this. I like the usability of the visited link looking different to an unvisited link but I'd also like to have my site look good the next day. I think the site would look "stale" or "dirty" if the visited links would reappear in that darker color.

View 11 Replies

Prevent Or Clear Back History With Form Submission

Basically I have 2 pages, '1) Quiz page' and '2) Result page'. Upon submitting the Quiz form, it will generate the result on the result page for the user. However I need to prevent user from clicking on back button or keying in Backspace on the keyboard. I researched the use of 'location.replace()' but have no idea how can I implement it within my form:

<form id="quiz" name="quiz" method="post" action="result.php">
<input type="submit" name="Submit" value="Submit" />

I would like to know if there is any way for me to use location.replace() within the form, or otherwise, any other way that I could prevent/clear user from getting back to the history page.

View 2 Replies

Clear Form Values History Of Mozilla Firefox?

In Mozilla Firefox when we enter values then history is maintain Unless


If there is way to clear values history using php

I use

header("Cache-Control: no-cache, must-revalidate");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Content-Type: application/xml; charset=utf-8");

But It not Clear Mozilla Values History.

View 4 Replies

PHP And Browser History

Is there any way to not add a page to the browsers history so if somebody looks in the history it will not be there?

View 1 Replies

Browser.history And Log File

I am very beginner with PHP. I have an Apache PHP enabled
webserver and want to know from where users are coming from.
Understand I want the last surfer's browser visited url.
I imagine I can do this with some kind of interraction
between 2 scripts : one client side, one server side.
The client one send the URL and the server one write it
in the right log file.
I have no idea of how to do this nor with principle nor
with syntax ...
Can somebody help with a few lines *working* example?

View 2 Replies

Browser History Problem

In some instances (after using forms) trying to go back through browser's history causes a 'Cannot find Server' error.
Hitting 'refresh' then loads the page correctly.

Example: After using the search funtion in upper right corner at to search for 'F', then clicking
on of the links.

How can this be resolved?

View 5 Replies

Disallow History In Web Browser?

I have a program that allows you to access webpages in my localhost.Now, my problem is that, when I try to list records in mysql by using tables, it remembers history and the previous data that you listed will appear like a ghost even if the data you inputted does not correspond to the data that it is showing.

View 1 Replies

Page Appears Twice In The Browser's History

I've got a login include file which appears on every page of my site which when submitted POSTs to the current page, and the include makes the appropriate changes now the user has logged in. The problem is that if the user then clicks 'back' in their browser they get the same page again, so they end up having to click 'back' twice in order to return to the previous page.

View 3 Replies

Browser History Not Stored Url While Redirect?

This problem occurs in all browsers except firefox. In my website, for ex, the home page will be like this [URL]. After finsihed authentication, I will redirect the page using header function in php to user's prfoile. So after logged in my page wil be like[URL}.. If the user clicked back button, I will check the session in signin.php and again redirect to user's profile page.

It works fine for me in firefox. Other than that all browsers, If I used header redirection, it will not store the page in browser's history. I mean, I am redirecting the user after authentication in signin page. So the signin.php url not stored in browser history. So If I use back button, it will go to previous site what I opened before opening my site.

View 1 Replies

Back A Page In Browser History

Is there a PHP snippet that will take a user back one page in browser history, or is everyone still using the JavaScript equivalent?

View 3 Replies

Force Browser To Re-request Page After History.back()

I've got two scripts: 1.php and 2.php. Here they are:

header('Pragma: no-cache');
header('Cache-Control: max-age=1; no-cache');
header('Expires: Tue, 1 May 1985 01:10:00 GMT');
header('ETag: "'.md5(rand(1, 1000)).'"');

Visitor lands on 1.php and then goes to 2.php. I want browser to re-request 1.php after vistor's click on "back" link. Currently, it doesn't work. How it can be managed? upd. I can edit 1.php ONLY and cant edit 2.php.

View 1 Replies

Post Form Resubmits When Going Back In Browser History

I have created a login page where the user has to input a username and password to login. The username will be put in a session and when the user logs out the session data and session itself gets destroyed. However when I go back in the browser history to the page where I logged in I get the "famous" resend information dialog that asks you to resend the information from the login form. Which means that all the post data gets resend and the user logs in again without having to put in a username and password.

Here is my code:
Code: [Select]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />


using a header to redirect to the login page is not going to work since I use my view_manager to display the pages. Does anyone know of any solution to get rid of that stupid resend information dialog without using a header? I tryed unsetting the values of POST in my login code but that did not seem to work. Is there anyone who knows how to remove the POST data from a form when the user goes back in browser history? If it's not possible, is there any solution except using a header?

View 14 Replies

Using Javascript History.back() Fails In Safari ... Make It Cross - Browser?

I am using

<a href="index.php" onclick="history.back();return false;">Back</a>

to provide a back to previous page link. It works fine on Windows (IE/Mozilla) but fails in Safari on both Windows/Mac. Is there a way to make it work on all of the systems/browsers (cross-browser/platform)? If it's not possible, is there any other way using PHP etc?

View 2 Replies

Clear Browser Cache

i want to clear browser cache with php script? any idea?

View 1 Replies

Clear Session After Browser Is Closed?

I want to clear my session after browser is closed?

View 3 Replies

Clear Session When Browser Close

I m doing one PHP project in which i maximum used Javascript and Ajax.Now client require that when he close browser session have to automatically cleared means when he open next time that browser he must have to login first. I tried to use javascript ONUNLOAD event of page but it cant work properly and one problem is that when i click on any other page that event occurs for current page which is also not good.

View 4 Replies

Clear The Browser Cache And Refresh ?

I have a script which allows a visitor to the web site to upload an image. Since this replaces an earlier image, it gets given the same name (desirably). The upload, and the renaming happen OK. But when all is committed to the database and the visitor is shown the result, the old image is still visible. Clearing the browser cache and refreshing the screen (manually) shows the new image.

Is there a way I can get PHP (or JS, I suppose) to do this automatically as part of the script ?

View 4 Replies

Session Is Clearing While Clear Cookies In The Browser?

I am doing a project in PHP. I have a small doubt in cookies and session.

Here is my doubt.

Cookies are saved on browser side. Session is saved on server side.

If we clear cookies in the browser why session is also getting clear.

As per conditions cookies are saved in browser side. And session are saved in server side. If we clear cookies in browser how the session which is stored in server is also clearing.

View 3 Replies

Forcibly Clear Browser Cache Through Some Code?

We are having a project with intensive static resource to make the page load faster we have used browser caching a lot. Now the problem we face is every time we update a static content css or js. The user complains of some issues. I understand that user can clear cache manually and get the right stuff. But cannot it be possible that when a update file goes. It loads a new version of itself we are using php with wamp.

View 4 Replies

Caching - Clear Browser Cache To Avoid Form Data Resend After Refresh

I'm developing a PHP-MySQL app that enables registered users to enter text comments. Problem is:

User sign-in into the web site - OKAY
User presented with a form to submit text comment - OKAY
User enters text comment and submits - OKAY

I have a routine that sanitize the comment & save it into MySQL (with userid, textcomment, datetime stamp) & present back the user that his/her comment is entered - OKAY

User decides to refresh browser - a duplicate comment is entered - BAD!

I was thinking 3 options: OPTION 1: Routine that checks: last time user posted comment, and if so, check if this is a duplicate. If duplicate then display error message. OPTION 2: Routine that does not allow a user to post too quickly. So basically do not allow postings of comments within 1 minute or so. So if browser is refreshed the comment will be ignored. OPTION 3: Manipulate the browser cache to clear out its contents so when refreshed no duplicate will be entered.

Now in the context of my application, my concerns with OPTION 1 and OPTION 2 is performance PHP-MySQL since I already have various queries within the same page that push/get data from databases. So OPTION 3 may target the issue differently. Questions is: If I go for OPTION 3 can this be considered a Best Practice?

View 5 Replies

How To Browser Delete Session Or Delete History Works

Let a user using Mozilla browser, On three tabs he login to his yahoo account ,gmail and hotmail. Now if we Clear Recent History, all three session will be cleared. But at the same time if there is another session in any another browser it will not be cleared.

So What i am trying to ask here is , the cookies and session related details ,browser cache will be in the local computer and it will be cleared on clearing history. But is it browser specific? The cookie and all will have any browser specific id , how it will differentiate that now clear the IE history or clear chrome history.

View 2 Replies

Page To Go Back One Page In The Browser History

I need a page to go back one page in the browser history. How would I do this? (NOTE: I know this can be done in JavaScript, but I want it in PHP)

View 5 Replies

History With Php Tag

if there is a possiblillity to get php to do redirect the user of the site back 1 history.

View 1 Replies

Copyrights 2005-15, All rights reserved