0

I have a website that if running on a mobile device such as Android table or more importantly Kindle Fire, if goes into a wifi scenario where the connection is not too good, it times out randomly. The site has a jquery ajax keep alive but it uses the root domain url to do this, and what seems to be happening is that the Kindle times out trying to re-do the current page url.

Can anyone suggest how to for the aspx website that uses a masterpage, upon keep alive, to do its reload from cache and not a full url reload, as the full reload seems to be the issue.

I have tried the google offered options, and I know how to check for the device (i.e. is the site desktop/laptop or mobile device), but not how to make the Kindle browser use cache but a kept alive url).

  • don't reload the whole page in the first place, use AJAX to just get the changes. – Barmar Feb 06 '18 at 21:09
  • Is there not a way to somehow tell the aspx page (as I say I can detect the device as Kindle) to make the aspx page, maybe in the code behind, use cached css/js pages and not hit the server everythme? – MA Smythe Feb 06 '18 at 21:45
  • Javascript doesn't have any direct access to or control of the cache. But a browser will normally use its cache automatically if it tries to `GET` the same URL and the server says the results haven't changed. – Barmar Feb 06 '18 at 21:47
  • Cache is never used for `POST` requests, though. – Barmar Feb 06 '18 at 21:48
  • Silk browser in the Kindle Fire doesn't seem to be working that way though. I have identified the issues with he browser on my web system locking when trying to reload JS and CSS files. Again, the site is aspx. Must be a way somehwo to tell the page (if it's a Kindle if I use browser detect) to force to use the cache for css/jss? – MA Smythe Feb 06 '18 at 21:53
  • No, there's no way to force a client to use cache. All you can do is provide hints, using the cache control headers. – Barmar Feb 06 '18 at 21:54
  • Hints? What do you mean by that? Can you elaborate please? – MA Smythe Feb 06 '18 at 22:34
  • https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control – Barmar Feb 06 '18 at 22:34

0 Answers0