browser-history

What are possible cases making window.history.state null on browser back?

佐手、 提交于 2020-01-13 20:41:55
问题 I have my website's query string URL like: ?budget=0-&year=0-&kms=0-&so=-1&sc=-1&pn=1 When user go to next page (From page 1 to page 2): We explicity increment pn (page number by 1) and set it in query string URL. Changed query string: ?budget=0-&year=0-&kms=0-&so=-1&sc=-1&pn=2 I also store the old query string, it looks like: ?budget=0-&year=0-&kms=0-&so=-1&sc=-1&pn=1 I then push both to window history to change URL and save previous for browser back: window.history.pushState(oldQS, null,

How to insert content script in google chrome extension when page was changed via history.pushState?

让人想犯罪 __ 提交于 2020-01-13 09:10:52
问题 I'm creating a small google chrome extension for website, and I want to change some html on particular pages. The problem is that website load his content via ajax, and heavy use history.pushState API. So, I added this thing to manifest: "content_scripts": [ { "matches": ["http://vk.com/friends"], "js": ["js/lib/jquery.min.js", "js/friends.js"], }, ] Everything works fine when I'm opening page first time or reloading it. But when I'm navigating between website pages, chrome don't insert my

Chrome doesn't cache hidden form field values for use in browser history

允我心安 提交于 2020-01-10 17:59:28
问题 I have a ASP.Net web form that contains both text box fields and hidden fields. The hidden field values are modified dynamically using client side JavaScript. Posting the form, inspecting the values and redirecting to another page is all working as expected. However, when I use the browser back button to display the previous page then I expect so see that ALL form fields are still populated with the values that were posted. In IE and Firefox this is the case for both text and hidden input

get back to previous page

风流意气都作罢 提交于 2020-01-10 01:34:26
问题 just i want to make back button in my site. once i click the button it need to take the url in to previous page. how can i make this using jquery? 回答1: the answer by wRAR is correct, you can use history.back or history.go(-1). However, if you are using ajax, you might need a bit more than that. Stephen Walter has a nice article on how to use jQuery, ASP.NET, and Browser History which basically describes how to save and restore the application state yourself. I recommend you give a read.

Implementing “Back button” on jquery ajax calls

大兔子大兔子 提交于 2020-01-05 12:57:08
问题 I'm trying to implement back button on this full ajax website.. I tried jquery history plugin but I'm sure I messed something, as the hash appears OK but the back button won't load the original content back.. This is what my menu looks like: <div id="nav" class="ajaxload menu"> <ul> <li><a href="home.aspx">Home</a></li> <li><a href="about.aspx">About Us</a></li> <li><a href="contact.aspx">Contact</a></li> </ul> </div> And the ajax calls: $(function() { var $content = $('#content'); $('

goBack() in WebView goes back ALMOST all the way

旧时模样 提交于 2020-01-05 04:40:32
问题 (EDIT: Maybe I should rephrase the title, but it still describes the behavior correctly. Sometimes when you goBack() to the first URL it loads, and sometimes it doesn't. Even if I do it with loadURL() in onResume! See the code I appended to the Activity at the bottom of the question.) The back button override works well and goes back through the pages I've visited. Until it should go back to the start URL which loads fine from onCreate. Then I get a small delay and a blank page, instead of

How to see all HTTP Get request sent from browser without debugging tool?

馋奶兔 提交于 2020-01-04 04:14:27
问题 so, I have page doing a number of ajax and jsonp(i.e. injection) to get data. I would like to know how to find out the request URL I have made without using debugging tools, like firebug. etc. i.e. the history of GET request of the browser. Thanks 回答1: For the most part, browsers do NOT log a history of their HTTP GET requests. Also, if you're using ajax, you're probably doing HTTP POST requests as well. You don't have to use an in-browser tool like Firebug, but you will need some tool to

AngularJS $location without templates

╄→尐↘猪︶ㄣ 提交于 2020-01-04 03:07:04
问题 I would like to use the $locationProvider service in AngularJS without rendering a new HTML template in my ng-view . I have a div element that is shown on demand via ng-show binding to the existence of a data element. I would like to wire this to the browser location via the $locationProvider but stay within the same template. Template: <div> other stuff ... </div> <div ng-show="model">{{ model.element }}</div> Controller: Controller = function($scope, $location) { $scope.show = function() {

HTML cache history back

依然范特西╮ 提交于 2020-01-03 12:30:10
问题 If I use history.back() for button press then what will happen? Will the HTML content be displayed from the local history of the browser or the cache and without the browser requesting to the server? Or will the browser request to the server based on the URL that resides in history of browser? 回答1: Calling "history.back()" in JavaScript is the same as hitting the back button in the browser's user interface (however, there can be slight differences if the currently viewed location contains

getting WebView history from WebBackForwardList

て烟熏妆下的殇ゞ 提交于 2020-01-02 02:53:08
问题 How do i get the history of a WebView using the WebBackForwardList class? I looked at the documentation page but i could not understand it, is WebBackForwardList the proper way to access the history of WebView? I intend to parse the history to a ListView, I cannot find any examples of how to access the history of WebView, What is the proper method to get the history? 回答1: On your webView instance, just use copyBackForwardList(), for example WebBackForwardList wbfl = webView