-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for HTML5-History-API (IE9) and support older browsers. #111
Comments
Okay sure. I'll have a take on this. |
Any estimate on when this will be implemented? Cheers! |
Modern JS frameworks have ditched support for non-evergreen browsers, so I don't see it being a problem here. Perhaps add it as a config option for those of us who don't want it and prefer clean, hash-free urls?. :) |
Yes. It's not we are going to cut down features. But to see how it works
|
hi, I have tried adding |
sent a PR to page.js. visionmedia/page.js#288 |
page.js already added support for the History polyfill: visionmedia/page.js#109 but as you discovered the slash issue still messes up ie9. A lot of people have tried to get this fixed in page.js:
For a bit of history, every single previous Meteor router has faced trouble with IE support, going all the way back to the venerable Router: Tom played a big part in getting page.js updated by working with Devote to get PR109 in there. What we did in Router and mini-pages was use a patched version of page.js and automatically include the html5-history-api polyfill. Not actually sure how iron-router does it. Older meteorite packages exist for history and patched page.js:
Those would probably need to be updated to work with the new package system. We talked with MDG a long time ago about adding some kind of support for conditional loading of packages based on browser capabilities or version but nothing ever came of it. Would be really nice to not have to deliver HTML5-History-API to everyone but putting it in |
So I think to get IE9 support working you can create a new package with the patched page.js and then rely on that instead of the upstream version. At least until upstream gets patched. Then users who are interested in supporting IE9 can install the History polyfill. First step, anyways. Not sure what compatibility issues will come up. The polyfill will use hashes "#" to emulate push state so it limits apps in that way (can't use it for other things like tabs or anchor links). But that would only affect apps that care about IE9 support so should be OK. |
I think, I agree with you. We can use a different package to get patched page.js and rely on that. I think that's gonna work. |
Good news, using patched page.js and the history polyfill gets us a lot closer to full IE9 support. Test Results
The There are two other tests that sometimes fail:
I've never seen them fail together at the same time though. Testing setup To easily test in IE9, you can use the virtual machine images that Microsoft provides for free here: http://dev.modern.ie/tools/vms/ Tom already has new versions of his two packages on Atmosphere so I used those to test with:
|
Great. @pahans also working on using the patched version directly. |
The Using @pahans's patched version should fix that test. @pahans, the best way to handle this is probably to do just what Tom did and publish a "wrapper" package to atmosphere with your patched version. Would you like me to do it? |
@alanning I think we have a even better way of doing this. let me try that and i will update you soon. |
Ok, thanks |
Nice! All tests passing on IE9, Chrome latest, and Firefox latest. Cool that you can reference a tar.gz straight from Npm.depends. |
We'll do a release today :) |
Hey guys, great work in adding IE9 support! I'm testing it out on a test app I have locally however I'm not managing to browse from one page to the next by clicking on links as one would normally do when browsing. When clicking nothing happens. It only works if I right click a link and select "open link" or "open link in new tab" form the context menu (i.e. tell the browser access the URL directly) Are there any other packages besides Packages I have installed:
P.S. links generated with Thanks! |
I think FlowRouter is just the base for IE9 support. You need to work on some other packages and your app for that. |
@danielparas there was a issue with that PR. we have have fixed it now. can you try it on flow router 2.1.1? |
@pahans - working perfectly now! 👍 Thanks |
Seems like there's a missing test for "click link == page changes". Not sure if there's a way to test that with tinytest. Any interest in testing with Jasmine? Cucumber would be best but I don't think it can be used to test packages, only apps. (Hope I'm wrong about that though.) |
flow-router
currently does not support IE9. Adding HTML5-History-API (html5 history polyfill) will fix this.page.js
mentioned supporting it, should be great if flow-router does likewise.The text was updated successfully, but these errors were encountered: