browser-state

The best Ajax History and Bookmark plugin currently available [closed]

纵然是瞬间 提交于 2019-12-20 03:44:07
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 8 years ago . It seems that each Ajax History and Bookmark plugin has some minor bugs, ranging from Really Simple History http://code.google.com/p

Can you use hash navigation without affecting history?

你说的曾经没有我的故事 提交于 2019-12-17 17:24:30
问题 I'm afraid it might be impossible but is there a way to change the hash value of a URL without leaving an entry in the browser's history and without reloading ? Or do the equivalent? As far as specifics go, I was developing some basic hash navigation along the lines of: //hash nav -- works with js-tabs var getHash = window.location.hash; var hashPref = "tab-"; function useHash(newHash) { //set js-tab according to hash newHash = newHash.replace('#'+hashPref, ''); $("#tabs li a[href='"+ newHash

JQuery Back/Forward Functionality with Ajax

送分小仙女□ 提交于 2019-12-11 05:55:47
问题 I've been coding a site using JQuery to load different .html files into a content div on the page. Of course this means that the back and forward buttons don't do much to navigate within the site. I've done some research, and found a bunch of options like history, and even found this Stack Overflow question regarding my issue. Unfortunately I've spent two days now banging my head against my keyboard trying to get one of these jquery plugins to work. Can someone help me to implement one of

How do I use jQuery to create a bookmark-able hash?

放肆的年华 提交于 2019-12-10 07:44:09
问题 I have a single URL I am using as an image gallery. At this URL is a thumbs div (I'm only showing four thumbs for the sake of brevity): <div id="thumbs"> <img src="graphics/thumbs/01.jpg" width="190" height="190" class="thumb objects" id="project01" /> <img src="graphics/thumbs/08.jpg" width="190" height="190" class="thumb web" id="project08" /> <img src="graphics/thumbs/14.jpg" width="190" height="190" class="thumb freehand" id="project14"/> <img src="graphics/thumbs/04.jpg" width="190"

JavaScript .hashchange performance. Can it bring any slowdown?

匆匆过客 提交于 2019-12-09 13:26:30
问题 jQuery hashchange event For me it looks like most mature solution right now(please correct me if I'm wrong). I really like this plugin for manipulating with browsers hashes. It simplifies js code a lot in some cases. I really want to start use it extensively but I have a question for you. Accordingly to the source it uses loop and check whether hash anchor was changed every 50 ms. What about performance? Can I overuse hashchange? Can it lead to some significant slowdown in performance? If so

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

大憨熊 提交于 2019-12-06 02:47:50
问题 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 problem Say the "home" page has a DIV a number of images in it and a list of links ... Page One Page Two Page Three The images may take a while to load, in the

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

北城余情 提交于 2019-12-04 09:26:26
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 problem Say the "home" page has a DIV a number of images in it and a list of links ... Page One Page Two Page Three The images may take a while to load, in the meantime the user will often not wait for them to load fully and click the "Page One" link. This clears

JavaScript .hashchange performance. Can it bring any slowdown?

非 Y 不嫁゛ 提交于 2019-12-03 16:22:44
jQuery hashchange event For me it looks like most mature solution right now(please correct me if I'm wrong). I really like this plugin for manipulating with browsers hashes. It simplifies js code a lot in some cases. I really want to start use it extensively but I have a question for you. Accordingly to the source it uses loop and check whether hash anchor was changed every 50 ms. What about performance? Can I overuse hashchange? Can it lead to some significant slowdown in performance? If so in which cases? Checking a simple string property every 50ms is an infinitesimal cost compared to

How to “bookmark” page or content fetched using AJAX?

天涯浪子 提交于 2019-12-03 14:35:59
问题 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? It looks like that's how facebook does it. What are other good ways to do it? 回答1: Update: There is now the HTML5 History API (pushState, popState) which

Does back/forward in the browser change javascript variables?

放肆的年华 提交于 2019-11-30 15:27:40
<script type="text/javascript> var x = 0; //this occurs in the beginning of the page. $("#button").onclick{ x = 1; } </script> Let's say the variable "x" changes to 1. Then the user clicks a link. When the user clicks "back", will x be 0 or 1? It will be 0 . The browser does not cache the state of Javascript variables between page loads. Update This is not the case in browsers such as Firefox. Please see Trey's answer. Trey Hunner As detailed in another question , the real answer to this question is it depends on the browser . In Firefox and Opera, the below page will preserve the state of 1