Link to home
Start Free TrialLog in
Avatar of hutchison
hutchison

asked on

Can you delete history item?

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?
ASKER CERTIFIED SOLUTION
Avatar of webwoman
webwoman

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rabanero
rabanero

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!

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,
NJ
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...
Avatar of Michel Plungjan
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

Michel
rabanero,
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)

:)
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.
https://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click the Help Desk link on the left for Member Guidelines, Member Agreement and the Question/Answer process.  https://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

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.
https://www.experts-exchange.com/questions/Q.20128021.html
https://www.experts-exchange.com/questions/Q.20174762.html
https://www.experts-exchange.com/questions/Q.20181711.html
https://www.experts-exchange.com/questions/Q.20230634.html
https://www.experts-exchange.com/questions/Q.20244696.html
https://www.experts-exchange.com/questions/Q.20258320.html
https://www.experts-exchange.com/questions/Q.20267851.html
https://www.experts-exchange.com/questions/Q.20270473.html




PLEASE DO NOT AWARD THE POINTS TO ME.  
 
------------>  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 https://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643
 
Thank you everyone.
 
Moondancer
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.
Admin notified of User neglect. Force-accepted by
Netminder
CS Moderator