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

Add Turbolinks for faster loading #2064

Open
namangupta01 opened this issue Jan 22, 2018 · 8 comments
Open

Add Turbolinks for faster loading #2064

namangupta01 opened this issue Jan 22, 2018 · 8 comments
Assignees
Labels
enhancement explains that the issue is to improve upon one of our existing features

Comments

@namangupta01
Copy link
Member

namangupta01 commented Jan 22, 2018

Please describe the problem (or idea)

We can add turbolinks for faster loading of our web-pages.
Turbolinks can make a Rails app feel faster by using JavaScript to replace the page content when clicking a link.

@jywarren What do you think of this?

@namangupta01
Copy link
Member Author

@jywarren I have added this gem and tried on my local instance the speed has increased more than i was thinking. Loading very fast. Whole page is not loading only the things that are changed on the other pages are loading.

@namangupta01 namangupta01 self-assigned this Jan 22, 2018
@namangupta01
Copy link
Member Author

Just look at the loader on the top of both.
Before applying turbolinks :
without

After:
with

@namangupta01 namangupta01 added the enhancement explains that the issue is to improve upon one of our existing features label Jan 22, 2018
@jywarren
Copy link
Member

jywarren commented Jan 22, 2018 via email

@namangupta01
Copy link
Member Author

namangupta01 commented Jan 22, 2018

@jywarren I guess we don't have to look for any issue currently but if there can be issues regaring this in future we can sort it out because turbolinks by-default come with rails 4 --onwards and since we have upgraded this project from rails 3 to rails 4 thats why we donot have turbolinks by default becuase there were no turbolinks in rails 3

@namangupta01
Copy link
Member Author

Infact Turbolinks uses Pjax which uses Ajax which only loads the body that is changed by making Ajax Calls. It makes the app behave like single page application even the app is not single page application and evantually it also makes it faster as single page applications are and undoubtly, it also create better user experience.

@namangupta01
Copy link
Member Author

namangupta01 commented Jan 22, 2018

Github also uses turbolinks thats why we donot see any loader i guess.
Websites those who are using turbolinks:
https://gist.github.com/marteinn/64259f09b440985c2a8e9de2a15f9eb5

@jywarren
Copy link
Member

Wow, cool! Let's test it out on our unstable container. Let me try that out now. unstable.publiclab.org -- it'll take a few minutes to build.

@jywarren
Copy link
Member

OK, in stable, we're seeing the typeahead search system not running normally when in a turbolinks page, and found some more JavaScript event changes to make, which i did in #2132. But that seems to have broken some other events.

I think this needs more work, and we'll leave all this code in but disable it in production (#2133) for now. Don't be discouraged! There are lots of things we can do to test this out progressively, and let's start by listing things we saw that weren't completely working.

In #2132 we have a great start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement explains that the issue is to improve upon one of our existing features
Projects
None yet
Development

No branches or pull requests

2 participants