Is it possible to make window.location.replace or window.location.href work with turbolinks as a simple link?
window.location.replace
window.location.href
From the documentation: https://github.com/rails/turbolinks#triggering-a-turbolinks-visit-manually
You can use Turbolinks.visit(path) to go to the URL through Turbolinks.You can also use redirect_to path, turbolinks: true (or turbolinks: :advance ) in Rails to redirect through Turbolinks.
You can use Turbolinks.visit(path) to go to the URL through Turbolinks.
Turbolinks.visit(path)
You can also use redirect_to path, turbolinks: true (or turbolinks: :advance ) in Rails to redirect through Turbolinks.
redirect_to path, turbolinks: true
turbolinks: :advance
This should work:
Turbolinks.visit('http://google.com')
Yes.
As written here
You can use Turbolinks.visit (path) to go to the URL through Turbolinks.