Jquery 历史/后退按钮插件的当前状态?

Current state of Jquery history/back-button plugins?(Jquery 历史/后退按钮插件的当前状态?)
本文介绍了Jquery 历史/后退按钮插件的当前状态?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

大约一年前,我花了很长时间研究这个问题,我试过了:

I spent a long time looking into this about a year ago, I tried:

  • Jquery BBQ 插件
  • Jquery 历史插件
  • jquery .address 插件

我发现 jquery.address 插件是最好的,但这些东西变化很快.

I found the jquery.address plugin to be the best, but these things change quickly.

最近有没有人彻底研究过这个选项?在我再次集成 jquery.address 之前渴望听到一些想法(我之前没有任何问题)

Has anyone thoroughly researched the options for this RECENTLY? Keen to hear some thoughts before I integrate jquery.address again (I didn't have any issues with it before)

推荐答案

我是History的作者.正如 SnippetSpace 在他的回答中所说,js 与 HTML5 History API 为旧版浏览器提供可选的哈希回退.HTML5 History API 允许您直接修改 url,因此不再需要哈希!耶!

I am the author of History.js which as SnippetSpace has said in his answer works with the HTML5 History API with an optional hash-fallback for older browsers. The HTML5 History API allows you to modify the url directly, so no need for hashes anymore! Yay!

有关后退/前进插件当前情况的列表,您可以在此处查看:https://github.com/Modernizr/Modernizr/wiki/HTML5-跨浏览器-Polyfills

For a listing of the current situation of back/forward plugins you can check here: https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browser-Polyfills

由于 HTML5 History API 是一个正确的解决方案对于 back/forward/hash/hashbang 问题,与旧的 hashchange 解决方案相比,这确实是要走的路.哈希的问题包括:访问哈希 url 时双重加载、不同的 url、与禁用 js 的用户共享哈希链接不起作用.

As the HTML5 History API is a proper solution to the back/forward/hash/hashbang problem, it's really the way to go compared to the old hashchange solutions. Problems with hashes include: double load when accessing a hashed url, different urls, sharing hashed links with js-disabled users don't work.

还有一个支持 HTML5 History API 的插件是 jQuery Address,但是它不支持诸如 replaceState 之类的东西,而且我不确定它对 HTML5 History API 的实际跨浏览器支持.但是看看它的 问题列表 我是说它的支持不是好吧.

There is one other plugin which supports the HTML5 History API which is jQuery Address, however it does not support things like replaceState and I'm unsure of it's actual cross-browser support for the HTML5 History API. But looking at it's list of issues I'm saying that it's support isn't that well.

这篇关于Jquery 历史/后退按钮插件的当前状态?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

相关文档推荐

在开发JS过程中,会经常遇到两个小数相运算的情况,但是运算结果却与预期不同,调试一下发现计算结果竟然有那么长一串尾巴。如下图所示: 产生原因: JavaScript对小数运算会先转成二进制,运算完毕再转回十进制,过程中会有丢失,不过不是所有的小数间运算会
append() 方法在被选元素的结尾(仍然在内部)插入指定内容。 语法: $(selector).append( content ) var creatPrintList = function(data){ var innerHtml = ""; for(var i =0;i data.length;i++){ innerHtml +="li class='contentLi'"; innerHtml +="a href
问题描述: 在javascript中引用js代码,然后导致反斜杠丢失,发现字符串中的所有\信息丢失。比如在js中引用input type=text onkeyup=value=value.replace(/[^\d]/g,) ,结果导致正则表达式中的\丢失。 问题原因: 该字符串含有\,javascript对字符串进行了转
Rails/Javascript: How to inject rails variables into (very) simple javascript(Rails/Javascript:如何将 rails 变量注入(非常)简单的 javascript)
CoffeeScript always returns in anonymous function(CoffeeScript 总是以匿名函数返回)
Ordinals in words javascript(javascript中的序数)