browser-history

Can we get browser history by using Javascript?

ε祈祈猫儿з 提交于 2019-11-26 20:56:12
问题 Can we get browser history for my site with Javascript ? I can see some of old posts and threads talking about that... but those approaches didn't work for me. Is it possible or not and how? 回答1: You can make use of History object of javascript to do that The history property has the return value as history object, which is an array of history items having details of the URL's visited from within that window. Also, note that the History object is a JavaScript object and not an HTML DOM object

Preserve dynamically changed HTML on back button

和自甴很熟 提交于 2019-11-26 18:58:12
问题 It's amazing, I constantly see this working in other sites but never in sites that I'm working on. I'm bringing in new content with ajax, I know about history.js and the History API, I do not want to change the URL, just have the browser cache the new HTML content so when a user leaves the page and comes back using the back button, it still has the updated HTML. I see this working all the time in other sites without URL changes or using the hash #. Is there a trick to get it to work or is it

How to clear browsers (IE, Firefox, Opera, Chrome) history using JavaScript or Java except from browser itself?

坚强是说给别人听的谎言 提交于 2019-11-26 17:56:06
How to clear browsers (IE, Firefox, Opera, Chrome) history using JavaScript or Java, except clearing it from browser itself? The document.location data in browsers is generally inaccessible to scripts, because allowing access would give any given site access to your entire browsing history. At most you can do a few simple manipulations, like "go to history entry #37" or "go back one page". But you can't do "what was the address of the page in history entry #23". Most banking sites will use javascript links to prevent a click history from being built up. They'll do document.location.replace" to

Javascript history.PushState not working?

巧了我就是萌 提交于 2019-11-26 16:44:55
问题 I have this code here: <script type="text/javascript"> function goFunction(){ history.pushState("google.ca", "GOOGLE CANADA", "http://www.google.ca"); return event.preventDefault(); } </script> and <a href="#" onclick="javascript:goFunction();">GO</a> when I click on my link, I get this error in my error log: Uncaught SecurityError: A history state object with URL 'http://www.google.ca/' cannot be created in a document with origin 'http://cowelllaserhair.com'. you can see this at: http:/

How do you access browser history?

荒凉一梦 提交于 2019-11-26 16:26:08
Some e-Marketing tools claim to choose which web page to display based on where you were before. That is, if you've been browsing truck sites and then go to Ford.com, your first page would be of the Ford Explorer. I know you can get the immediate preceding page with HTTP_REFERRER, but how do you know where they were 6 sites ago? Javascript this should get you started: http://www.dicabrio.com/javascript/steal-history.php There are more nefarius means to: http://ha.ckers.org/blog/20070228/steal-browser-history-without-javascript/ Edit:I wanted to add that although this works it is a sleazy

How to change the URL displayed in the browser without leaving the page

限于喜欢 提交于 2019-11-26 14:08:56
问题 Is it possible with JavaScript to change the browser's URL, but not leave the page? 回答1: In older browsers, you can not change the url in the address bar without leaving the page. But you can change the hash portion of the url without leaving the page. That is to say you can change www.example.com to www.example.com#new_text with JavaScript window.location.hash = "new_text" ; everything after the # can be changed. However, in HTML5 there is a new History API which allows you to change the

Android read browser history

假装没事ソ 提交于 2019-11-26 13:01:33
I want to read browser history in Android phone. I have done some document reading, then I come to know that we can read browser history by android.provider.Browser class. It has : final static Cursor getAllVisitedUrls(ContentResolver cr) ...method which returns Cursor . May I get help to handle Cursor, or any example code to get browser history? Macarse Not really an answer but I can tell you what I did. I first clone the browser repo and try to reproduce how they get the history. And I started getting: Permission Denial: reading com.android.browser.BrowserProvider So I added: <uses

Popstate on page&#39;s load in Chrome

天大地大妈咪最大 提交于 2019-11-26 12:51:32
问题 I am using History API for my web app and have one issue. I do Ajax calls to update some results on the page and use history.pushState() in order to update the browser\'s location bar without page reload. Then, of course, I use window.popstate in order to restore previous state when back-button is clicked. The problem is well-known — Chrome and Firefox treat that popstate event differently. While Firefox doesn\'t fire it up on the first load, Chrome does. I would like to have Firefox-style

Intercepting call to the back button in my AJAX application

早过忘川 提交于 2019-11-26 11:15:45
I have an AJAX app. A user clicks a button, and the page's display changes. They click the back button, expecting to go to the original state, but instead, they go to the previous page in their browser. How can I intercept and re-assign the back button event? I've looked into libraries like RSH (which I couldn't get to work...), and I've heard that using the hash tag somehow helps, but I can't make sense of it. Ah, the back button. You might imagine "back" fires a JavaScript event which you could simply cancel like so: document.onHistoryGo = function() { return false; } No so. There simply is

How to clear browsing history using JavaScript?

醉酒当歌 提交于 2019-11-26 06:46:03
问题 I am doing a simple project, let us take high secure website. I have 5 different JSP pages. If I started from first JSP page, it is redirecting to second JSP page and so on. In the meanwhile, it should not store those pages in my browser history. How to clear those browsing history using JavaScript? 回答1: It's not possible to clear user history without plugins. And also it's not an issue at developer's perspective, it's the burden of the user to clear his history. For information refer to How