[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

How to clear the back-button list from IE

Posted on 2002-03-08
11
Medium Priority
?
1,684 Views
Last Modified: 2008-02-01
I want to clear the dropdown items from the back-button from Internet Explorer.

How/where can i do that

can it be done withj javascript
0
Comment
Question by:hessmac
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
  • 2
  • +2
11 Comments
 
LVL 23

Expert Comment

by:b1xml2
ID: 6850028
that really can't be done. Becos there is no way to clear the history cached on the client-side by the user.

What you can do is to use javascript to open any links found on your page, so there will only be ONE reference to your site.

<script>
function replaceWindow(szURL) {
 window.location.replace(szURL);
}
</script>

html syntax
============
<a href="javascript:replaceWindow('user.html');">Log On</a>


from msdn
==========
Replaces the current document by loading another document at the specified URL.

Syntax

location.replace(sURL)
Parameters

sURL Required. String that specifies the URL to insert into the session history.

Return Value

No return value.

Remarks

When a document is replaced, it is also removed from the history object. Moreover, the user interface navigation methods, such as the Back and Forward buttons, will no longer access the URL.

0
 
LVL 23

Expert Comment

by:b1xml2
ID: 6850030
you wont be able to clear any references not related to your site.
0
 
LVL 23

Expert Comment

by:b1xml2
ID: 6850031
and if a user types in a url to your site, and has come from other sites, the BACK button is still clickable.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 6850230
The history collection is read only.  What b1 gave you is the closest control you re going to get.  The other option is to open a new window and the use location.replace to prevent the accumulation of a historical trail.

Cd&
0
 
LVL 19

Expert Comment

by:webwoman
ID: 6850651
Just to expand on Cd& -- you'll prevent a historical trail for THAT WINDOW ONLY. The history for the main browser window will not be affected.
0
 

Author Comment

by:hessmac
ID: 6854322
Thanks fot the info B1.. I dont't like it but thanks anyway.

Is there a way to disable the back-button(and its functionality, I mean als disable the backspace etc to go backwards in history) and write my own back-button with which i CAN control the history.



0
 
LVL 23

Accepted Solution

by:
b1xml2 earned 1200 total points
ID: 6854329
short of opening a new window and disabling the the contextmenu via
document.oncontextmenu = function () { return false; },
you can not really do that.

You cannot control a user's history via script. It's considered non-doable at this point in time. It is also a security feature to some extent.
0
 
LVL 19

Expert Comment

by:webwoman
ID: 6854371
Sure! Write a new browser that does exactly what you want, and get everybody who might possibly want to ever view your site to download and use it.

Short of that, no.
0
 
LVL 23

Expert Comment

by:b1xml2
ID: 6854373
hessmac, i know that you're not pleased with the answers given but they are correct and deserves the grade A as they are all spot on.
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 6854408
There seems to be a relationship between questioners who want to override security and user preferences to violate their right to use their browser the way they wish; and grading histories that reflect a lack of respect for experts. Maybe it is just coincidence that the lack of respect appears general.....

Cd&
0
 

Expert Comment

by:goldcd
ID: 8274758

To prevent posting a form twice, I use this technique.

Upon success, my script returns only this instruction, if failed, return a normal page.

<script>
history.go(-1);
location.replace("success.html");
</script>

tested in IE 6 only
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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…

649 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