Skip to main content
November 22, 2014
Question

Download

  • November 22, 2014
  • 1 reply
  • 293 views

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.

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
November 24, 2014

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.

November 30, 2014

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.

kglad
Community Expert
Community Expert
November 30, 2014

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.