Can you delete history item?

Posted on 2001-09-11
Last Modified: 2012-05-05
I want to send the user to the main page of a site but i dont want them to have and histoy options or the ability to go back. Can this be done?
Question by:hutchison
LVL 19

Accepted Solution

webwoman earned 50 total points
ID: 6475688
Not in the main browser window... if you open a new window, the back button won't go further back than the page it opened with, and you can turn off the features you don't want.

But in the main browser window, you don't have that option.

Expert Comment

ID: 6475908
Try in your body tag:

<body onunload="window.location='thisPage.html'">

where thisPage.html is the name of the same page.

P.D.: When I tried it I have had Dr.Watson's alerts, but perhaps it's my system. Try it!

Expert Comment

ID: 6475912

If you don't want people to be able to browse back within your site you could use the document.location.replace() method.

When you replace and URL with this method, that URL also replaces the current page in the clients history.

If you use this in each link within your site, there will be no links in your history to use for the back-button.

To start off with a clean history to start with, opening a new window is probably the best option (as webwoman suggested)

hope this helps,
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.


Expert Comment

ID: 6475937
NJ, and what about existent URL's in history. window.location.replace() it's good if you have opened the windows and start to navigate inside this pages, but when you have navigated before and then load any kind of these pages, this method is not efficient.

One second. If you load a index.html, for example, and only is a loader to a second page without location() creates a new history element. Then if you go back you will load index.html and inmediately rebound to second page.

It's a dummy method. If you press "back" quickly you go back more than one time...
LVL 75

Expert Comment

by:Michel Plungjan
ID: 6476113
Or right-click on the back button to bypass the page.

It is considered VERY rude to break a back button.

newjack's suggestion is the one to use


Expert Comment

ID: 6476131
your remark is legit, and that's why I added there lines in my previous comment:

>To start off with a clean history to start with, opening
>a new window is probably the best option (as
>webwoman suggested)


Expert Comment

ID: 6858045
Question(s) below appears to have been abandoned. Your options are:
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you. You must tell the participants why you wish to do this, and allow for Expert response.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question. Again, please comment to advise the other participants why you wish to do this.

For special handling needs, please post a zero point question in the link below and include the question QID/link(s) that it regards.
Please click the Help Desk link on the left for Member Guidelines, Member Agreement and the Question/Answer process.

Please click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues, to track all your open and locked questions at this site.  If you are an EE Pro user, use the Power Search option to find them.

To view your open questions, please click the following link(s) and keep them all current with updates.

------------>  EXPERTS:  Please leave any comments regarding your closing recommendations if this item remains inactive another seven (7) days.  Also, if you are interested in the cleanup effort, please click this link
Thank you everyone.
Moderator @ Experts Exchange

P.S.  For any year 2000 questions, special attention is needed to ensure the first correct response is awarded, since they are not in the comment date order, but rather in Member ID order.

Expert Comment

ID: 6909158
Admin notified of User neglect. Force-accepted by
CS Moderator

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now