TurbolinksPlug
This plug integrates turbolinks into your phoenix application.
Because turbolinks makes an xhr requests it cannot update browser URL on redirects without help from backend.
And that’s exactly what this plug does. After each redirect initiated by turbolinks it sets Turbolinks-Location header to hint url.
Installation
Add
turbolinks_plugto your list of dependencies inmix.exs:def deps do [{:turbolinks_plug, "~> 0.1.0"}] endAdd plug to your pipeline in
web/router.ex
pipeline :browser do
...
plug TurbolinksPlug
end