Copy link to clipboard
Copied
Heya.
How to detect if for example an image has already been loaded and saved on client's device, is in cache?
Imagine:
Client run an application that download an image.
After some time the client run the application ones again.
Now the application doesn't need run as before.
But to program new behavior I need to know if cache has been deleted or not, if the files are saved on client's device.
Regards
S.J.
Copy link to clipboard
Copied
you can't probe a browser's cache using a web based app without breaching user security, but you might draw inferences by using the download speed.
in any case, there's no compelling reason for you to know what's in and what's not in the user's cache.
Copy link to clipboard
Copied
I have a reason.
When the app. is opened second time it displays the progress bar then starts loading, but it takes only two seconds and the bar has to disappear.
When it happens so quick it doesn't look good. I would prefer to no show the progress bar at all.
It is about perfection.
The app. would just appear better if I would not show progress bar when it is needed for only two three seconds.
Copy link to clipboard
Copied
before displaying the progress bar check the user's download rate. if it appears the download will be less than 2 or 3 seconds (or whatever you want), don't display the progress bar.
Copy link to clipboard
Copied
I thought about that.
If I display something else and check the download rate and realize it takes more than 3 seconds I will have to display progress bar.
But when I do that the downloading will be already in progress and the progress bar will suddenly display some progress.
In my case the progress bar is vary fancy and it looses a lot on appearance when starts like that.
Copy link to clipboard
Copied
you're choice but you won't be able to probe the user's cache.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now