Questions tagged [html5-history]

The HTML5 History API allows programmatic manipulation of the browser's history through JavaScript, providing a method of managing the user's history stack when creating web applications.

The HTML5 History API allows programmatic manipulation of the browser's history through JavaScript, allowing interaction with the browser's history as though it is the user.

Useful documentation:

585 questions
-1
votes
1 answer

history.pushState URL interaction with jquery load causing page fetch failure?

I'm using history.pushState to set a URL, while at the same time using a jquery .load to actually load the page content. I'm new to the history API, but I understand that this is the normal way to get back-button/etc functionality in dynamic…
EML
  • 8,369
  • 6
  • 37
  • 72
-1
votes
3 answers

How to include user input in the html string of a some parent DOM element?

I want to store the content of a div container in windows history, by running the following line: window.history.pushState($('#myDivId').html(), "title", 'some url'); I would later use this info when user presses the back button. Problem: User has…
Hooman Bahreini
  • 11,018
  • 7
  • 41
  • 74
-1
votes
1 answer

How to make element visible on history.back action with JavaScript?

I need a solution which makes element visible after history.back triggered. Initially, the div is hidden on a page. After a user clicks the button, the div becomes visible. Then then user visits another link and load page2. When user clicks Back…
-1
votes
1 answer

Forward button not working when using history and pushState/currentState on modal

I'm using history and pushState/currentState to: Change the URL when the modal is fired. If back button or modal close button is pushed, close the modal and go back to the previous URL. If modal is fired, closed, and the forward button is pushed,…
Adam Robertson
  • 517
  • 1
  • 8
  • 19
-1
votes
1 answer

Routing does not work well with HTML5-History-API

In a mean-stack web application, I use html5mode and have the following code in index.html:
SoftTimur
  • 8,904
  • 23
  • 106
  • 212
-1
votes
1 answer

How to implement a global click handler without conflicting with already defined events

I would like to bind a click event to all the elements inside a web page without getting conflicted with the events which are already defined. I' trying to use the following code to define the global click event. $("body").click(function (event)…
Imesh Chandrasiri
  • 5,280
  • 13
  • 51
  • 96
-1
votes
1 answer

Using html5 history in place of hash urls to restore the history of the user

We have a single page application that loads results based on query string. The query string looks like: ?city=Delhi&pn=1 The SPA has different sections on the same webpage. When user navigates to those sections, we maintain history using hash…
Sahil Sharma
  • 3,027
  • 3
  • 29
  • 71
-1
votes
1 answer

Change multiples URL parameters with PushState

I need to change multiples URL parameters with pushState(), For an example: example.com/controller/method1/page3 If i use pushState(data, title, 'method2/page1') It'll produce example.com/controller/method1/method2/page1 How do I change multiples…
-1
votes
1 answer

Fine control of history pushstate in Backbone

Sorry, I couldn't think of a good title. I would like to have the default pushstate behaviour, but have custom behaviour during certain situations. So I want all links to be normal /login, /register, etc. If the user is on the homepage, I want those…
Jason McCarrell
  • 2,461
  • 5
  • 27
  • 57
-1
votes
2 answers

Navigation menu dont work while overriding back button HTML 5 History API

I am new with the history API. Navigation menu stops working when page loads in chrome, In firefox it works first time but then again navigation menu stops working. but when I comment the function, History API doesn't work. Everything else works…
Shreejibawa
  • 1,772
  • 1
  • 22
  • 33
-1
votes
3 answers

Back button in web development

The history.back in javascript doesn't work. Like this. My scenario: Request page1 > page2 > page3 > page4 Processing stuff in page4 (redirect to) > page2 , now I want the back button in page2 redirect to page1. Questions How do we implement this…
Dzung Nguyen
  • 8,760
  • 13
  • 61
  • 98
-2
votes
1 answer

Run unit tests on local server within a Gulp task

I'm trying to run automated unit tests in the terminal for an application library that uses the History API internally. I am using Babel to transpile and merge my unit tests (written using Mocha/Chai/Sinon) to a single test file. I then open a local…
Ryan
  • 1
-2
votes
1 answer

Should I use history.js?

I am working on dinamic web site it works fine with History API but I heard about some browsers issue about it.Which browsers support it?Then I decided to use history.js but it contains eval function and I know it is dangerous and slow.Shoul I use…
Ibrahim Hasanov
  • 393
  • 1
  • 3
  • 10
-2
votes
1 answer

History API in html5

In history API, I can use pushState() for tabbing structure to display different content based on tab clicked. When ( click on tab2, the url changes to http://localhost/mysite/tab2 But When I bookmark this url and then open this bookmark, it shows…
Optimus
  • 116
  • 7
-4
votes
1 answer

Disable back/forward browser buttons until page is loaded completely

Is there any way to disable user from clicking browser's back/forward button until the currently accessed page is loaded completely. Page being loaded completely need not refer to the API requests being made within the page. Simply looking if the…
anusreemn
  • 986
  • 7
  • 23
1 2 3
38
39