Ruby on Rails Friday, July 29, 2016

Reading the original post it sounds like the application is on the internet, but if the user is in a bad signal, or middle of the jungle area with no signal they still want the app to work. 

There is no way that this will really happen as the dynamic pages will still require a connection to the server, you cannot cache a dynamic page (you can cache the result of a call for a limited time, but that is not dynamic), that is the point, it is dynamic, and so needs connectivity. you can cache the static assets, but that is about all.



On Friday, 29 July 2016 05:02:45 UTC+1, tamouse wrote:
On Thu, Jul 28, 2016 at 8:04 AM, Rupinder Kaur <rupinde...@gmail.com> wrote:
On Wednesday, July 27, 2016 at 9:35:35 PM UTC+5:30, Colin Law wrote:
On 27 July 2016 at 12:55, amitoj singh <amitoj...@gmail.com> wrote:
> Hello Developers,
> I am working on a Web rails project which is working fine with the
> Internet. But I have to use this project in the areas where there is
> no or very less internet connection. So I would have to make this web
> application work offline.
>
> The application contains multiple pages. How can I do so? I thought to
> do so using cache I have found this
> http://guides.rubyonrails.org/caching_with_rails.html. Can I use this
> in my application? If yes then how?. I want all my views(html) as well
> as assets( stylesheet and Javascript) should work offline.
>
> I had tried rack offline but it can only do single page offline. Now I
> am working on service worker but still unable to do multiple pages
> offline.

Rails caching as described in the guide describes how to cache common
pages on the server, not in the browser PC.  If you do not have access
to the internet (and therefore cannot access the server) then this
form of caching will not help.

If you want to use your application offline then the pages must be
saved somewhere.  Where are you hoping that this might happen?   In
the browser?

Colin

Hello developers,

I am also facing the same problem. I am trying to make the whole rails app offline which has multiple pages with dynamic content and photos as well as the audio file. I tried the rack-offline but found that it does not work for me because it is outdated and then try the serviceworker-rails gem and follow the  https://rossta.net/blog/offline-page-for-your-rails-application.html tutorial and create one page that works offline when the app is not connected to the internet but my requirement is to make the multiple pages of the application work offline which have dynamic content instead of creating a new page. Please suggest me some alternative. I am new in rails and I tried a lot of ways but did not get the solution yet because I don't have any prior experience. How should I store the pages that will work offline? How can we do so? 


It sounds to me as though you both (amitoj singh and Rupinder Kaur) actually want to run from a server that is not attached to the internet, but you can still point your browsers at. This retians the rails-ness of your application, but doesn't allow anyone on the internet to access it.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/c821ce58-52f9-4671-b90d-17cad94fe253%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment