Comments (13)
Yeah it's a good point. I solved this with jQuery Ajaxy which I'm working on updating for History.js. So for now you're out of luck, but I will improve this soon enough :)
from history.js.
Got it. But if there is a way I can identify if the state I want to push is the same as the current state, I can code around it. But I don't know if that comparison is possible.
from history.js.
It's quite hackish but you it should be something like History.normalizeState(...).id === History.getState().id
I'm on my iPhone before bed so can't confirm. But that should be right, check tests.js we do something like that in there.
Otherwise waiting is the best bet. Patience patience patience eh? ;P
from history.js.
hehe. Yeah. But you said you are fixing it with jQuery ajax, and I'm using Mootools, so I can't wait for that. I will try it and post to see if it worked.
from history.js.
Okay. I've thought about how I will do this. I'll make it so the statechange
event still fires and provide a History.getState().same
flag.
It is a better solution than adding an additional statesame
event, as issue #42 is also dependent on this.
from history.js.
Perhaps I should add the option: History.options.preventSameStateFromFiringStateChange
so extra configuration is not needed in the statechange handler. Thoughts? /cc @yohanleafheart @markjaquith @deleteme
from history.js.
I like the idea of the configuration because most application will work better (or at least more consistent) if it is not fired. Besides that, allowing the statechange to fire is fantastic.
from history.js.
I do not have a good enough understanding of the problem at hand, or the solution proposed, to have an opinion on it. Also, This is the first time I saw that you tagged me in the thread. I don't know how github intends on notifying people.
from history.js.
I won't do the option, I'll improve the documentation - it will be up for the individual to be aware.
from history.js.
Hey mate, any ETA on this so I can program myself to get the latest?
from history.js.
Hey mate, my MacBook died a week ago and I'll only receive my new machine towards the end of the month. In the meantime I'm on an old laptop so have enough power to code, but not enough power to test. So around the start June is when the new release will be out.
from history.js.
Hi, is there any progress on a solution to this issue?
from history.js.
It's inside the v1.8 branch, though that branch isn't stable yet. Not sure when I'll be able to line up more work to pay for history.js development, so feel free to submit pull requests for the 1.8 branch. I'll happily provide any assistance for people who are looking to contribute to history.js development.
from history.js.
Related Issues (20)
- Few test cases are failing on X86. Saying "operation insecure"
- How to use History API State with hash urls?
- IE/Edge pop last saved object irrespective of current URL
- change url cross domain
- native.history.js detected as virus HOT 1
- No default jsDelivr CDN file set
- jquery.history.js breaks the script adn return "History.js Adapter has already been loaded..." error.
- replaceState removes first character of hash (#) when it contains dot "."
- indicating locale code to url
- Problems with webpack encore at page loading
- The Solutions section is missing the hashtag solution
- Change domain "mysite.com/page1" to "mysite.com"
- npm WARN deprecated: Update deprecated dependencies HOT 1
- history.goback() is not working for mozilla firefox
- page is not jump used push HOT 1
- OnPopState calls in case of section change
- Back Button Error while using with VueJs Data
- Revise tests
- How to unbind function from History.Adapter.bind? HOT 1
- security scan result HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from history.js.