Skip to content
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

Consider adding a page fetcher/swapper like Turbolinks #132

Open
skulptur opened this issue Mar 28, 2020 · 2 comments
Open

Consider adding a page fetcher/swapper like Turbolinks #132

skulptur opened this issue Mar 28, 2020 · 2 comments

Comments

@skulptur
Copy link
Contributor

I haven't directly tested Turbolinks with Muban, but skimming over its documentation looked like it should work out-of-the-box. If that is the case, we could get a much better UX out of our websites with virtually no cost. I am willing to work on the PR if this feature is something we are considering a good fit for Muban.

@ThaNarie
Copy link
Member

Funny enough we did similar things 7-8 years ago already before going to SPA route :)

We might need to be careful - If you read the docs, there are quite a few cases where manual intervention is needed to ignore certain turbolinks-behaviour because it would have resulted in unwanted scenarios (at least, different from what would happen in a normal browser).

A downside for me is the user of eval for executing inline script tags that are loaded through XHR. Although inline script tags should not be used at any case when using correct CSP setting.

It has my blessing if:

  • it's turned off by default in Muban
  • turning it on is a conscious decision on a per-project basis (approved by the TD / client)

Luckily it can be turned off easily as well without any downsides, so could be worth a try in an existing project first.

@ThijsTyZ
Copy link

I wonder if this could lead to memory leaks when the JavaScript is not disposed properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants