Skip to content
This repository has been archived by the owner on Jul 28, 2018. It is now read-only.

Turbolinks.visit, partial replacement & relative urls (& IE11) #655

Open
10io opened this issue Jan 7, 2016 · 0 comments
Open

Turbolinks.visit, partial replacement & relative urls (& IE11) #655

10io opened this issue Jan 7, 2016 · 0 comments

Comments

@10io
Copy link

10io commented Jan 7, 2016

Hello!

I'm using Turbolinks.visit manually with partial replacement. Here is an example of such call:

Turbolinks.visit('/update', { 'change': 'content' })

On Chrome, FF and Safari, it works as expected.
On IE11, a full replacement is done instead of a partial one.

If I use an absolute url:

Turbolinks.visit('http://172.22.22.54:4001/update', { 'change': 'content' })

it works correctly on IE11.

Hence my question, is Turbolinks.visit intended to be only used with absolute urls?
If so, the readme could be updated: there are some Turbolinks.visit usage examples with relative urls.

After some digging, it seems that this line (crossOrigin function in ComponentUrl) is the issue:

  • On Chrome, @origin returns correctly http://...
  • On IE11, it returns // -> the crossOrigin function will return false -> a full replacement will be done.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant