/    Sign up×
Community /Pin to ProfileBookmark

How to access browsers history from my page?

Hello, I need to know how you access a browsers history. I am trying to stop my iframes on my page from being added to the history. Or to add something to the history so it reads it instead of the iframes.

I can figure out how to get help with different parts of the code that will help with this. I just need something to get me started. What javascript variables tap into the browsers history from a web page? Please let me know, thank you very much.

to post a comment
JavaScript

8 Comments(s)

Copy linkTweet thisAlerts:
@Arty_EffemFeb 11.2007 — What javascript variables tap into the browsers history from a web page? Please let me know, thank you very much.[/QUOTE]None. The pages viewed by others are no concern of yours.
Copy linkTweet thisAlerts:
@RiannaauthorFeb 11.2007 — I am trying to stop my iframes on my page from being added to the history. Or to add something to the history so it reads it instead of the iframes.[/QUOTE]

Thanks, others do this all the time. I'm trying to make something better on my pages. If others can so this I know there is a way for me to as well. Anyone know?
Copy linkTweet thisAlerts:
@mudeltaFeb 11.2007 — you can access the history array, but noy change it.

http://www.w3schools.com/htmldom/dom_obj_history.asp
Copy linkTweet thisAlerts:
@RiannaauthorFeb 11.2007 — I was told some of these can.

I probably don't need to change it, I could just load something into it so it chooses my last web page, instead of the iframe page when someone hits the back key.

window.location=('#http');

window.location.hash = "http";

window.location.href = newURL;

window.name

window.location.hash = summary;

dhtmlHistory.initialize();

dhtmlHistory.addListener(historyChange);

function historyChange(newLocation, historyData)

back() Loads the previous URL in the history list. Programmatic equivalent to the user pressing the browser's 'back' button.

forward() Loads the next URL in the history list. Programmatic equivalent to the user pressing the browser's 'forward' button.

go() Loads a specific page in the history list

addHistoryListener(HistoryListener) Adds a listener to be informed of changes to the browser's history stack.

getToken() Gets the current history token.

newItem(String) Adds a new browser history entry.

onHistoryChanged(String)

removeHistoryListener(HistoryListener) Removes a history listener.

Perhaps I could just add a message so that when the back button is touched

a message appears, saying something like "the back button won't work, to get to the last page go this address http:// etc......

I was told there is a way to access these functions and other web sites do it. Whoever knows, please get back to me, thank you very much.
Copy linkTweet thisAlerts:
@RiannaauthorFeb 14.2007 — I can use my own back button then. Anyone know how I can keep the browsers back button from working? So I can use my own instead? Thank you very much.
Copy linkTweet thisAlerts:
@A1ien51Feb 14.2007 — If you do not want your pages to be cached, you should be using meta tags to tell the browser not to cache it.

Eric
Copy linkTweet thisAlerts:
@slaughtersFeb 14.2007 — ... I am trying to stop my iframes on my page from being added to the history. ...[/QUOTE]Use location.replace when navigating away from the page in question.

It Replaces the current document by loading another document at the specified URL.

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.
Copy linkTweet thisAlerts:
@RiannaauthorFeb 14.2007 — Great tips you guys, thanks a lot. I thought the cache and the history were sort of related but two different storage locations. Are they one and the same? Thanks.
×

Success!

Help @Rianna spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.25,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...