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

Why does window.history.back() jump back two states?

I have been playing with window.history.pushState and onpopstate but it seems to me that pressing back jumps back two states, skipping one. See…
Casper
  • 258
  • 4
  • 10
0
votes
1 answer

Does Firefox handle window.onpopstate differently than Chrome and Safari?

I've been trying to get a single page application working on Chrome, Safari and Firefox but Firefox doesn't seem to be executing the window.onpopstate at all. window.onpopstate = function() { fullpath = location.pathname; …
Emanegux
  • 1,000
  • 2
  • 17
  • 37
0
votes
1 answer

Automatically load content inside div on jQuery Address plugin bookmarked page

I'm using jquery.address plugin to update my browser's address bar while loading content through ajax. Everything works fine, except I have no idea how to automatically load the event.value or event.path into the DIV I'm using to load content when…
McEnroe
  • 61
  • 1
  • 7
0
votes
1 answer

Refresh page once when popstate is fired?

I have a long page which navigates via scrollTop(). Because scrollTop() doesn't work propperly with back buttons of browsers (the browsers ignore it) I want to try and refresh the browser on every popstate, then it would work and the users scroll…
user1721135
  • 6,122
  • 8
  • 29
  • 58
0
votes
2 answers

How to stop an tag from loading a new page with html5 history api

I am trying out the history api for changing the url after swapping out content and have run into an issue with stopping the a tags from loading a new page. So far, when you click a button, it loads the requested content within the page but then…
Emanegux
  • 1,000
  • 2
  • 17
  • 37
0
votes
0 answers

Is there something like "onpathchange"?

When using hash fragments for url manipulation with javascript, you can simply detect all changes in the url fragment part using onhashchange event. Is there any similar way to detect changes in the path part of url using HTML5 history API? I know,…
Samuel Hapak
  • 6,423
  • 2
  • 30
  • 54
0
votes
1 answer

history.pushState() and clicking back/forward button

This is my code to change url on ajax load which works $.ajax({ url: url, success: function (data) { $(selector).html(data); var title = data.match("(.*?)")[1]; // get title of loaded content window.history.pushState(…
Serjas
  • 1,992
  • 3
  • 19
  • 35
0
votes
2 answers

HTML5 history.pushState

I am using history.pushstate method to add the history into the browser and added the history as follows in the browser. history.pushState("", "",myurl); The history added in the browser correctly.(When the browser history clicked the…
Aravindhan
  • 3,430
  • 7
  • 23
  • 40
0
votes
1 answer

Content is being loaded successfully via ajax. but not showing

I am playing around with djax when I click an anchor tag the url changes and when I view the page source it also changes but the page itself did not change its contents even if I view the page source it has change up any ideas why? Here's a snippet…
user962206
  • 13,699
  • 56
  • 164
  • 259
0
votes
2 answers

HTML5 history popstate with ajax, direct link not work

This Demo I want to click forward to content(index.php?id=id) click back to subject(index.php). Q1. (index.php?id=id) direct link content page not available, it will show (index.php) subject , why? Q2. Click back after the second times (forward >…
user1775888
  • 2,707
  • 9
  • 37
  • 57
0
votes
5 answers

How can I make wordpress infinite scrolling change the URL?

I'm making a new blog for a startup who want a similar infinite scrolling effect to http://qz.com/ It also needs to include the URL changing as seen within the previously mentioned link. For the life of me I can't figure out how it's done, I think…
Charlie Ryan
  • 211
  • 4
  • 16
0
votes
0 answers

window.history.pushState issue on IE

I am using jQueryUI Auto-complete on my site along with it is the window.history.pushState which changes the browser-url without refreshing the page. It perfectly works on Chrome and Mozilla but unfortunately it does not work the way I wanted it to…
Tsukimoto Mitsumasa
  • 973
  • 4
  • 17
  • 38
0
votes
0 answers

Using history.popstate with DIVs and AJAX

I am creating a 'portal' type page a for a website whereby the initial 'landing' stage on the site contains a background image and very minimal content, but clicking a link entitled "about us" fires an AJAX command to load the page 'about.php' into…
0
votes
1 answer

google closure compiler and history API

I have this code that I'm putting through the GCC in advanced compilation mode: window.addEventListener('popstate', function (event) { .... } I get this message: JSC_WRONG_ARGUMENT_COUNT: Function Window.prototype.addEventListener: called with 2…
frenchie
  • 46,331
  • 96
  • 283
  • 483
-1
votes
1 answer

htaccess html5 history api - redirect to root folder works only without hash in route

i've configured my htaccess file for html5 history api using Navigo like this: RewriteEngine On RewriteBase / RewriteRule ^index\.html$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME}…
Wolfgang Müller
  • 205
  • 1
  • 4
  • 15
1 2 3
38
39