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
0
votes
1 answer

How to change main URL in reason of navigation at iframe?

I tried this, but users need to click back button twice, one to change the back the hash and another to back the iframe content: (TypeScript) this.iframeApp.load(() => { if (this.sameDomain()) { window.location.hash =…
Felipe Fujiy Pessoto
  • 6,492
  • 8
  • 40
  • 71
0
votes
1 answer

html5 history api fallback?

I am new javascript. I managed to create a .load script which loads in different views (with alot of help). Its working but I don't know how to tell the script to load in the appropriate view when someone uses a url like…
Robert Richter
  • 151
  • 2
  • 12
0
votes
1 answer

How to use pushState,replaceState and popState correctly?

I'm trying to use the history API but I can't get it working as I'd expect. I've look at several examples but they all appear to be doing something wrong. That is, this flow doesn't work as expected: On new page call pushState On popState load…
edA-qa mort-ora-y
  • 26,115
  • 34
  • 118
  • 238
0
votes
1 answer

pushState: How to prevent browser from attempting to load the page

I am trying to get a hook into the history object. Lets say http://my-site.com is the root url. If someone enters http://my-site.com/ is it possible to listen to the change of the fragment and fire and event associated with that in…
MIdhun Krishna
  • 1,601
  • 11
  • 28
0
votes
2 answers

GWT: onBack and onForward "history handlers"

Does GWT provide any way to define click handlers for when the user clicks the back/forward browser buttons? If so, how could I define such handlers? If not, why?
IAmYourFaja
  • 50,141
  • 159
  • 435
  • 728
0
votes
1 answer

Why do I have to press back twice to go back in Backbone?

Live Demo of the problem I have this little example app, where I try to implement a routing system with history. It works as excepted, but for some reason I have to press the back button twice. If you open the console, you can see the logs. When I…
totymedli
  • 23,114
  • 18
  • 109
  • 143
0
votes
0 answers

HTML5 Histroy API/History.js how to go to a shorter URL when coming from a long one

I want to be able to do someting similar to Dropbox. when accessing the URL site.com/folder1/folder2/folder/folder4 through a regular request how can I use the history API so I can jump to folder1(I want to set the link to site.com/folder1) when…
user1113314
  • 733
  • 8
  • 22
0
votes
0 answers

Updating address bar with new URL and no hashtag

In my project I am using this Ajax function (below) to get the content (it works really well ^^). Anyway I would like to have a nicer looking URL (to be honest I am no fan of the hashtag,) with the script I have been using until now I get something…
adho12
  • 355
  • 4
  • 11
0
votes
1 answer

history.js reload page on back button

I'm new to html5 and history.js, still trying to grasp the concept of history.js. two questions here. is history.js just used to change the URL in the address bar with out a page refresh? (like using the hash to manipulate the url) I've done a…
user2636556
  • 1,855
  • 4
  • 27
  • 58
0
votes
1 answer

JavaScript's session history management using S3 static hosting?

I am currently developing a website that dominantly uses JavaScript (JS) history. Now the problem is, this history uses pathname of the URL. So for example if I use S3 as static hosting, and for the first time would like to request a URL like…
0
votes
1 answer

Loading and Saving state before going to next page using History.js

How does twitter implement this kind of functionality? let's say I am at this part of the web page. Then let's say I click another page (let's say Dev Ops Borat) After clicking that. I click the back button then I noticed that the I was back at…
user962206
  • 13,699
  • 56
  • 164
  • 259
0
votes
1 answer

Trouble clicking dynamic a tag on timeout

I have the following problem which seems easy but I can't figure out what is wrong. What I want to do is the following: When I click a link (example: mysite.com/blog/blog-article.html) the href of that link is saved to a variable. In javascript it…
paul_ngc
  • 111
  • 1
  • 10
0
votes
1 answer

HTML5 history API to reduce server requests

I am trying to develop a search filter and making use of the HTML5 history API to reduce the number of requests sent to the server. If the user checks a checkbox to apply a certain filter I am saving that data in the history state, so that when the…
codeGEN
  • 586
  • 2
  • 12
  • 39
0
votes
1 answer

History API - replaceState on a previous page?

Wondering if I can use the HTML5 history API's replaceState() method (or something similar) to change the state of a previously visited page (as opposed to the current page)?
JJK
  • 179
  • 1
  • 2
  • 8
0
votes
1 answer

Backbone.js common bootstrap pattern for using routing history api

I have single page web application is written on backbonejs. I use different routes and each route corresponds a controller. When I load my app root URL (myapp.com/) or any non-root URL without params (myapp.com/somelocation) it works correctly. But…