offline-caching

strange behaviour with cache.manifest / offline usage of web app saved to home-screen on ipad ios6

偶尔善良 提交于 2019-12-03 04:00:13
I just discovered some strange behaviour on iPad with the new iOS 6. I'm testing a web app for offline usage. The web app is no more than a static website with a cache manifest, so no special frameworks like sencha touch or tools like phnoegap are used. Just HTML, CSS and JavaScript and a cache.manifest. The App worked fine before: I could save the website to the home screen. When I opened it from there, all the data would be downloaded for caching. At the end of the download the pop-up would come to ask if I wanted to increase the cache to 50MB – accepted – everything was fine – offline usage

How to make offline maps(using leaflet OSM) , by caching?

Deadly 提交于 2019-12-02 17:35:53
I am trying to make offline maps through caching (IndexedDB) in browser. I understand the concept is that I download and store the tiles of map first when connected to internet. Then I have to load the tiles logically offline. However, I'm not able to figure it out. How do I store them and how to load them again logically? I'm stuck here. I am using the leaflet API for maps. How can this be implemented? Dr.YSG See my extensive research on this at: Storing Image Data for offline web application (client-side storage database) and at: https://gis.stackexchange.com/questions/44813/database-for

Android Load Cache Only is not working. Show WebView offline

家住魔仙堡 提交于 2019-12-02 10:44:47
问题 I'm trying to show some webpages via webview without connecting to the internet. I'm getting a Null-Pointer Error if there is no connection to the internet. If there is a connection it is working. So I think it's something with webView.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ONLY); webView.loadUrl("http://www.google.de"); Please help me. I already checked if the AppCachePath is correct with getCacheDir(); Thanks a lot webView.getSettings().setJavaScriptEnabled(true); webView

Service worker - network first then cache with fallback to static page

泪湿孤枕 提交于 2019-12-01 21:11:30
I want to add service worker to my site to offer a good offline experience to my site users. (Site back-end is PHP) I'm still new to Javascript promises and service workers, but here is what i reached so far : my index.php page has this script to register service worker <script> if ('serviceWorker' in navigator) { navigator.serviceWorker.register('sw.js')}; </script> and for service worker file i use the following code var CACHE_STATIC_NAME = 'static-v74'; var CACHE_DYNAMIC_NAME = 'dynamic-v74'; self.addEventListener('install', function (event) { console.log('Installing Service Worker ...',

Service worker - network first then cache with fallback to static page

故事扮演 提交于 2019-12-01 20:38:19
问题 I want to add service worker to my site to offer a good offline experience to my site users. (Site back-end is PHP) I'm still new to Javascript promises and service workers, but here is what i reached so far : my index.php page has this script to register service worker <script> if ('serviceWorker' in navigator) { navigator.serviceWorker.register('sw.js')}; </script> and for service worker file i use the following code var CACHE_STATIC_NAME = 'static-v74'; var CACHE_DYNAMIC_NAME = 'dynamic

how to fetch data from local json file?

巧了我就是萌 提交于 2019-12-01 11:47:37
I created a json file locally. I can view that in data>data>com.example.storage>files>filename.json. Using this, I want to fetch all the text values locally & download all images and save it in SD card from Image URL which is available in the json file. And in offline mode Itself I can load all the text values from json file as well as images from SD card. Please let me know if this idea will work out or not. If not Please suggest some other way to do this. The task is using local JSON file I want to fetch data. How to do that?(I am using separate ID for each data). Sample JSON file is. {

Show Network Error in android

二次信任 提交于 2019-12-01 11:09:14
I have created appliction with webview. if i have do any action and the net is disconnected i want to display one alert. I have tried the following, added this in oncreate method. public class AndroidNetTestActivity extends Activity { public static WebView webview; private Handler mHandler = new Handler(); private boolean isConnected = true; final String offlineMessageHtml = "Net is disconnected"; final String timeoutMessageHtml = "Connection timed out"; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); webview=

Increase iPad cache over 50 MB?

孤街醉人 提交于 2019-12-01 10:03:49
问题 I'm developing an offline webapplication using manifest and wondered about the maximum cache size on iPad. I made a few tests during which I was asked if I want to increase cache to 10 MB, 25 MB and 50 MB. So everything under 50 MB seems to be working (I disabled internet connection and after restarting Safari I could still navigate through the website). But above 50 MB is apparently not possible. Just to be sure: Does anybody know if it's possible to go beyond 50 MB? 回答1: 50 mb is the iOS

Show Network Error in android

…衆ロ難τιáo~ 提交于 2019-12-01 09:24:14
问题 I have created appliction with webview. if i have do any action and the net is disconnected i want to display one alert. I have tried the following, added this in oncreate method. public class AndroidNetTestActivity extends Activity { public static WebView webview; private Handler mHandler = new Handler(); private boolean isConnected = true; final String offlineMessageHtml = "Net is disconnected"; final String timeoutMessageHtml = "Connection timed out"; @Override public void onCreate(Bundle

Uncaught exception in Firebase runloop (3.0.0). Please report to support@firebase.com [closed]

空扰寡人 提交于 2019-12-01 00:53:56
I have a problem with offline capabilities. I turn on offline feature in my project with firebase. Everything is fine until i close app completely and reopen it. It made crash. This is log 05-23 07:44:58.407 7286-7328/com.iantsu.projectm E/RunLoop: Uncaught exception in Firebase runloop (3.0.0). Please report to support@firebase.com java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.gms.internal.zzafg.zzg(com.google.android.gms.internal.zzafa, com.google.android.gms.internal.zzahu)' on a null object reference at com.google.android.gms.internal.zzafc.zzb