The HTML5 History API allows a web page to manipulate the contents of the history stack in order to dynamically update the URL and respond to the back button.
Questions tagged [pushstate]
635 questions
12
votes
2 answers
How does pushState protect against potential content forgeries?
As seen in GitHub's blog, they've implemented HTML5's JavaScript pushState feature for tree browsing (for modern browsers), bringing AJAX navigation without Hash Bangs.
The code is simple:
$('#slider a').click(function() {
history.pushState({…

Nicole
- 32,841
- 11
- 75
- 101
12
votes
2 answers
Single page app in AngularJS and ASP.Net works fine, but when I refresh my page in the browser I get 404 errors
So I've set up an HTML5 single page application, and it's working well. The page is at /App/ and when some one goes to content it looks like /App/Content/1234.
One problem: If the user refreshes the page the server can't find that URL because it…

Ben Lesh
- 107,825
- 47
- 247
- 232
11
votes
2 answers
How Does Github Do pushState Without Hash Tags?
I've been researching the best way to utilize HTML5's history api aka psuhState with a proper fallback for HTML4 browsers.
Github uses the history api for its tree browsing (the following link is just an example, not the library github…

Yahreen
- 179
- 2
- 10
11
votes
3 answers
Forward button not working after history.pushState
I've found how to fix the back button, but the forward button has remained unfix-able. The url will change but the page doesn't reload, this is what I'm using:
$('.anchor .wrapper').css({
'position': 'relative'
});
$('.slanted').css({
'top':…

dan178
- 335
- 2
- 16
11
votes
2 answers
Can use pushState
Does anyone know of a library that determines if pushState can be used?
I was using this:
if(window.history.pushState){
window.history.pushState(null, document.title, path);
}else{
location.pathname = path;
}
But I just found out that there…

keegan3d
- 10,357
- 9
- 53
- 77
11
votes
3 answers
Simulate Voiceover page load in single-page pushState web application
I'm working on a single-page application (SPA) where we're simulating a multi-page application with HTML 5 history.pushState. It looks fine visually, but it's not behaving correctly in iOS Voiceover. (I assume it wouldn't work in any screen reader,…

Dan Fabulich
- 37,506
- 41
- 139
- 175
11
votes
1 answer
Configure IIS server to work with Aurelia framework and push state
I have created a basic aurelia app starting from this repo and I was trying to get rid of the # (hashtag) in the URL bar.
I have 2 projects, one running WebApi on a machine and one running an empty web project (not MVC) on another machine. On the…

Laurentiu Stamate
- 707
- 5
- 20
11
votes
1 answer
Update the document.referrer via history.pushState()
I'm using pushStates in my ajax-app to navigate from one "page" to another. Now, I'd like to see from what page I was coming from. But document.referrer always returns "". Or, when I open my app from another page (where it is linked), I got the URL…

kraftwer1
- 5,253
- 10
- 36
- 54
11
votes
1 answer
How to use PJAX? (PJAX With PHP?)
I was trying to get PJAX working with my PHP site, this is the code I am using for it: