I want to develop an offline html5 website with a large number of pictures (10 000).
The problem is that during the downloading process when safari ask me to increase the cache limit it stop the download and i need to start it again.
It's possible to make such application in html5 on a ipad ? can we breach the offline cach limit :) ?
Thks a lot in advance !!!!!!
The limit is set inside the browser itself, typically at 5MB. Currently, as far as I'm aware, the only way to increase it is by the user actually doing it via the browser menu.
There might be a way of increasing it programmatically, I don't know, but you would most certainly have to ask the user's permission to do so.
I also think it's a bit much to be expecting someone to allow 10k+ images to be stored on their system, that could be huge.
Related
I'm developing this cordova app which is required to save some data locally in case there is no internet connection available. This dataset also contains images in the form of a base64 string. Turns out I can roughly create about 7-8 items before my localstorage starts running out.
There seems to be a 5MB limit on almost all of the local storage techniques for mobile safari. After doing some googleing I couldn't find much concrete information on how to bypass this limit, as some apps are reported to have found a way around this restriction.
I'm currently using key value storage with that comes with Quasar Framework. (https://quasar-framework.org/components/web-storage.html) I'd love to keep using their API but if it's necessary I could always change some storage related code.
Is there a way to increase the size? I've ready about prompting the user for a storage increase but it's not explained anywhere specifically.
Thanks,
I had the same problem some time ago and i found no solution for localstorage.
This article is interesting if you want more details about localstorage and its limits : https://www.raymondcamden.com/2015/04/14/blowing-up-localstorage-or-what-happens-when-you-exceed-quota
To exceed this limit, I used IndexedDB which allows me to store much more data and especially to better store them.
Raymond CAMDEN has written a very interesting article that will guide you : https://www.raymondcamden.com/2015/04/17/indexeddb-and-limits
If you want to use IDB but are afraid of its complexity, there is Dexie.js which simplifies its use : http://dexie.org/
You may be able to use more browser storage by using a different API such as IndexedDB. https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API/Browser_storage_limits_and_eviction_criteria
I'm in the middle of making an app that will end up needing somewhere between 300-500 different images. I don't know if a database is the right way to go about this, or storing them locally. I doubt locally could do it, seeing as the app size would get huge. Would I just download all the files necessary for an event, then unload them when the event is done
TIA!
I am working on a web site project PHP/APACHE without any js until now.
I found out various ways to set the upload limit of an image to the server.
They work, but when I upload a very large one, the delay before the message "your file is too big" is from far too long. This means if a user does'nt understand what max 2.4MB is he will be likely to wait more than a minute or 2 before seeing the message.
My question is :
Do you know any mean to have the uopload automatically cancelled if the image he tries to transfer exceeds the limit ?
Thank a lot
SunnyOne.
Basically, there are 2 ways to do this: With Flash/Java, or with fancy HTML5 JavaScript that only works on some browsers (and the most recent version of those, as well.
Check these other SO questions for pointers:
Client Checking file size using HTML5? and Detecting file upload size on the client side?.
Also, check out these tools: YUI2 Uploader, FancyUpload, SWFUpload
To clarify I'm referring to the key/value localStorage pairs, not Web SQL DB or IndexedDB.
Is it strictly a 5MB limit for the iPad, or is it true that it's unlimited but it will ask the user to allow/deny once you exceed 5MB?
I'm hoping to use localStorage to store a large amount of data and so is important that it's unlimited.
Have a look at how the Financial Times web app deals with it:
http://apps.ft.com/ftwebapp/
On installation it detects the limit and then provides instructions for the user to manually increase their limit to 50MB using the Settings app.
If there was an easier/automatic way to do this, I'm sure they'd use it.
Yes, it's the same limit for iphone and other apple devices as well because of how Safari implemented localStorage. Take a look at this
Limit of localstorage on iPhone?
Safari mobile is limited at 50mb, if you try to write to local storage over the storage quota it will throw an exception. There is no way to check how much space is remaining, you simply have to try to write and catch the exception. Pretty terrible.
Below are some articles on the limits of the various storage types. The conclusion is Safari mobile sucks.
https://developers.google.com/web/fundamentals/instant-and-offline/web-storage/offline-for-pwa
https://en.wikipedia.org/wiki/Web_storage
https://learn.microsoft.com/en-us/previous-versions/windows/desktop/legacy/bg142799(v=vs.85)#_objmodel:
https://developers.google.com/web/fundamentals/instant-and-offline/web-storage/offline-for-pwa
https://www.html5rocks.com/en/tutorials/offline/quota-research/
I know you are looking for localstorage key/value pairs. Just like myself. I tried a native solution and apparently my iPad had 2.5 MB only for localstorage. So I switched to locaForage which is a IndexedDB (+more) wrapper in a very similar to localstorage api. It doesnt have these limitations of localstorage.
I develop an iPad application for a company. They want to use the application to show media, like pdf docs, pictures, video. They want one application for everything.
So I use a TabBar Application, each TabBar display a media, like pictures gallery, video gallery. The application is pretty big. And now the application is running slowly. The display of pdf is not smooth, the swich of tab takes time. I use the local data because I can use internet for the application, it needs to works everywhere without wifi.
So my question, is it a good idea to put everything in the same application? I add all my media in the xcode project.
Is the iPad good for displaying video, pdfs, pictures in the same application ? I want something smooth, but to much data for the memory kills my application. What ways I need to take ? Do you have ideas ?
It sounds like you are not purging media from memory when it is no longer used.
Make sure to release media related objects that are not immediately in use. Images in particular eat memory very quickly because all the data associated with an image has to been in memory. Unlike a PDF or audio file which can be read in as needed.
Users will expect and tolerate some slight delay switching from media type to media type because they experience that will all other apps and other forms of software. What they don't tolerate is slow performance while actively using a piece of media e.g. slow scrolling in a PDF file.