You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am interested in using basket.js to cache scripts but I want requested scripts to default to going to the server. In other words, I want to show cached versions of scripts when there is no connection to the internet.
The text was updated successfully, but these errors were encountered:
@omarmeky Well, we also use basket.js in situations, where sometimes there is no internet connection (iPad). The only way we found, was to patch the library in two spots.
at the isCacheValid function made sure to check if navigator.onLine. If it is, then we claim that the cache is valid. (but beware if you patch here: the line shouldFetch = isCacheValid(source, obj); is not easy to interpret. seems twisted to me)
at the bottom, check if the basket.clear(true) works for you. We removed it, because we felt it removed the cache too early. even if there was no internet connection and the app had no chance to get a fresher version.
Now it works fine for us. Even in offline situations.
I am interested in using basket.js to cache scripts but I want requested scripts to default to going to the server. In other words, I want to show cached versions of scripts when there is no connection to the internet.
The text was updated successfully, but these errors were encountered: