hashchange

How to keep the browser history in sync when using Ajax?

I'm writing a simple photo album app using ASP.NET Ajax. The app uses async Ajax calls to pre-load the next photo in the album, without changing the URL in the browser. The problem is that when the user clicks the back button in the browser, the app doesn't go back to the previous photo, instead, it navigates to the home page of the app...

What is the best back button jQuery plugin?

I have found two plugins that enable the browser's back button to work across ajax interactions, but I can't determine which is better and why. The two plugins are history_remote and the history. The history plug in is simpler and seems to provide all the functionality I need, but I'm not sure I understand enough about them to make a...

Detecting Back Button/Hash Change in URL

I just set up my new homepage at http://ritter.vg. I'm using jQuery, but very minimally. It loads all the pages using AJAX - I have it set up to allow bookmarking by detecting the hash in the URL. //general functions function getUrl(u) { return u + '.html'; } function loadURL(u) { $.get(getUrl(u), function(r){ ...

Enabling back/fwd key events for an Ajax Application

I have an application which works heavily on AJAX. However I want to have navigation functionalities in it. To spoof the url, I am changing the location.hash, to generate URL. But if i use back/fwd, only the url changes, but page wont reload. How can I override the hstory.back to reload the page. ...

Experiences with Javascript History Frameworks

I'm seeking a javascript history framework to handle navigation inside a page when the user selects multiple options which change the page behaviour. There are multiple artefacts on the page that change the data loading of the page and I'd like to store this as a stacked set of behaviour. In a wider sense, I'd like to add this as a tool...

On - window.location.hash - change?

I am using Ajax and hash for navigation. Is there a way to check if the window.location.hash changed like this? http://example.com/blah#123 to http://example.com/blah#456 It works if i check it when the document loads. But If I have #hash based navigation it doesnt work when I press the back Button on the browser (so I jump from blah#4...

When using back button AJAX results have been lost.

So I've set up a pagination system similar to Twitter's where where 20 results are shown and the user can click a link to show the next twenty or all results. The number of results shown can be controlled by a parameter at the end of the URL however, this isn't updated with AJAX so if the user clicks on one of the results and then choose...

jquery history plugin

I am using this plugin: http://plugins.jquery.com/project/history on this page: http://www.crtaci.info/index.php?autocom=majice I dont know why but it seems i cant figure out what to do to get this to work... Guess i need more sleep... :) ...

jquery ajax history and bookmarking plugin

There are plugins for handling history and bookmarking like: http://plugins.jquery.com/project/history. Somehow it doesn't look as a complete solution. For example, on one page you might have a filter that consists of several checkboxes, text boxes etc. You would like your page history functionality to update all those controls and to up...

Anchored AJAX and SEO workaround?

You all know how to build AJAX sites with those 300ms trigger for checking anchors (hash links) in URL and then loading proper page with AJAX. But, these anchor links are nothing to search engines =( I've thought of making some kind of workaround. All JS code remains the same, but, this little thing (I'm with JQuery, sorry): $('a').liv...

Javascript anchor navigation

I am creating a website with the "anchor navigation" like used with facebook and google mail. I have got it working but not fully. When I load the page with something like #contact it won't load it in unless I click the link for it. Also, would there be a better, more efficient way to do what I am doing? I am not the best person with JS ...

Handle URL anchor change event in js

How can I write the JavaScript callback code that will be executed on any changes in the URL anchor? For example from http://example.com#a to http://example.com#b ...

What's the best library to do a URL hash/history in JQuery?

I've been looking around JQuery libraries for the URL hash, but found none that were good. There is the "history plugin", but we all know it's buggy and isn't flexible. I am loading my pages inside a div. I'll need a way to do back/forward along with the url hashing. mydomain.com/#home mydomain.com/#aboutus mydomain.com/#register Wha...

How to get back button to work with anchors (#) and iframes

Hi, I am working on a site where the main part of it is driven by an ajax style navigation system using anchors in the url to define the application state. On top of this I now need to support IFrames that are loaded on top of this application. The problem I'm having is that the back button breaks if I make use of fragments. I've creat...

Redirect url to # (anchor)

I have a site that I just converted to use anchor navigation.. hwww.site.com/shows is now www.site.com/#shows It loads the info from the /shows directory to a div and adds the hash tag to tell you where you are. The problem is, if you go to www.site.com/shows, the content is still there, but unstyled. How can I get it to redirect wit...

JavaScript/jQuery - onhashchange event workaround

Until all browsers support the onhashchange event what is the best workaround for this? Is there something for this in jQuery? or as a plug-in? ...

jquery - hash change event

I am using: $(window).bind( 'hashchange', function(e) { }); to bind a function to the hash change event. This seems to work in IE8,firefox, and chrome but not in safari and I assume not in earlier version of IE. For these browsers, I want to disable my javascript code that uses the hash and hashchange event. Is there a way with jQu...

How to "bookmark" page or content fetched using AJAX?

How to "bookmark" page or content fetched using AJAX? It looks like it can be easy if we just add the details to the "anchor", and then, use the routing or even in PHP code or Ruby on Rails's route.rb, to catch that part, and then show the content or page accordingly? (show the whole page or partial content) Then it can be very simple...

Stop loading of images on a hashchange event via JavaScript or jQuery

I am using the jQuery BBQ: Back Button & Query Library plugin to create a page that pulls in dynamic content when a link is clicked. When the link is clicked the hash is changed and new content is pulled in (the 'default' action of clicking a href is therefore disabled.) That part works just fine, but there is a problem. Example of my ...

jQuery History Plugin works in Chrome?

The jQuery History Plugin (http://www.mikage.to/jquery/jquery_history.html) is said to work with Chrome: http://github.com/tkyk/jquery-history-plugin Supported Browsers IE6, IE7, IE8, Firefox3, Safari4, Safari5, Chrome4, and Chrome5 but then when i go to the top link mentioned above, if I click on load 1, load 2, and then ...