开发者

Link Button with No History

I am designing a website for a domestic violence agency and I want to include an "escape" button. However, simply havin开发者_如何学编程g a link leaves a danger of someone looking in the browser's history or clicking the back button to see where they were.

So, my question is: (1) Is it possible to load webpages and exclude them from the history? (2) Is it possible to disable the back button after following a link to, say, Google?

Thanks in advance for any help!


For disabling the back button:

<script language="text/javascript">

function goNewWin() {

//***Get what is below onto one line***

window.open("backbuttonnewpage.html",'TheNewpop','toolbar=1,
location=1,directories=1,status=1,menubar=1,
scrollbars=1,resizable=1'); 

//***Get what is above onto one line*** 

self.close()

}

</script> 

<a href="javascript:goNewWin()">Click to go to a new page</a>

from http://www.htmlgoodies.com/tutorials/buttons/article.php/3478911/backbutton.html


No.

However, you could detect the browser and then explain details on how to clear history/caches for their current browser.


Maybe and no. That is entirely browser driven. Some browsers have been known to replace pages in history when window.location.replace(newURL) is called, but that is not guaranteed and not recommended.


Concerning your first question: As far as I know, the browser's history is completely dependant only on the browser's settings. Websites cannot and (should not) try to access any of the browser's preferences and functionality . A website just provides information (i.e. code and resources) - it is the browser's task to decide what to do with it (how to parse and render it). So in my opinion, the best you can do is to suggest the user to clean one's history or use a "private mode". You even might provide information about how to do that, depending on the user's browser.

In any case: All the best for your project against domestic violence!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜