You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2021/10/08 11:19:29 UTC

[GitHub] [cordova-docs] mfulton26 opened a new issue #1210: Cache storage documentation

mfulton26 opened a new issue #1210:
URL: https://github.com/apache/cordova-docs/issues/1210


   # Feature Request
   
   Details on advantages/disadvantages, supported platforms, etc. for the Cache API supported by browsers, etc.
   
   ## Motivation Behind Feature
   <!-- Why should this feature be implemented? What problem does it solve? -->
   
   Cordova has some great docs for helping when making decisions on where and how to store data but doesn't currently provide information saved about the Cache API which can be used in some cases instead of IndexedDB. Documenting this will help folks make informed decisions.
   
   ## Feature Description
   <!-- 
   Describe your feature request in detail
   Please provide any code examples or screenshots of what this feature would look like
   Are there any drawbacks? Will this break anything for existing users? 
   -->
   
   Document Cache API similar to how localStorage, IndexedDb, Web SQL, etc. are documented.
   
   www/docs/en/dev/cordova/storage/storage.md
   
   ## Alternatives or Workarounds
   <!-- 
   Describe alternatives or workarounds you are currently using 
   Are there ways to do this with existing functionality?
   -->
   
   Various sites out there have some information about total size limits on iOS, etc. etc. but it is hard to find what applies to apps running inside Cordova/WKWebView.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-docs] mfulton26 commented on issue #1210: Cache storage documentation

Posted by GitBox <gi...@apache.org>.
mfulton26 commented on issue #1210:
URL: https://github.com/apache/cordova-docs/issues/1210#issuecomment-939183335


   Yes, if it could be tested and documented that would be very helpful for reference. Especially for iOS.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-docs] breautek commented on issue #1210: Cache storage documentation

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #1210:
URL: https://github.com/apache/cordova-docs/issues/1210#issuecomment-938602848


   Based on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Cache), it looks like the Cache API is a service worker feature. I'm pretty sure service workers are **not** supported by the underlying webviews. They are supported in the browser application themselves (e.g. Safari and Chrome) but not the WKWebView / Android System Webview counterpart in which the native apps have access to.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-docs] mfulton26 commented on issue #1210: Cache storage documentation

Posted by GitBox <gi...@apache.org>.
mfulton26 commented on issue #1210:
URL: https://github.com/apache/cordova-docs/issues/1210#issuecomment-938609451


   Although `caches` was introduced with service workers it is available on the `window` object similar to `indexedDb`.
   
   https://developer.mozilla.org/en-US/docs/Web/API/Window


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-docs] breautek commented on issue #1210: Cache storage documentation

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #1210:
URL: https://github.com/apache/cordova-docs/issues/1210#issuecomment-938627159


   Ah ok! Interesting. If that's the case I'd suspect it to work like the other web storage strategies. I think it should be tested though.
   
   > Various sites out there have some information about total size limits on iOS, etc. etc. but it is hard to find what applies to apps running inside Cordova/WKWebView.
   
   I know in Chromium, the web storage quota is not constant. It's dynamic based on the total available disk space available on the device. On devices with large space (> 10GB if I recall) the quota is about 10%, otherwise it's some hard-coded value. It's not documented, but you can find the code in the chromium source code. Which also means these rules are subjected to change, as it's an implementation detail.
   
   For iOS, I don't think there is any such code in the open source WebKit project -- but we do know there are limits. We just don't know how they decide those limits.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-docs] mfulton26 commented on issue #1210: Cache storage documentation

Posted by GitBox <gi...@apache.org>.
mfulton26 commented on issue #1210:
URL: https://github.com/apache/cordova-docs/issues/1210#issuecomment-938610088


   > Note that the `Cache` interface is exposed to windowed scopes as well as workers. You don't have to use it in conjunction with service workers, even though it is defined in the service worker spec.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org