Tuesday 15 April 2014

javascript - iPhone Web App disable cache -


I have created an iPhone webpage using PHP in the main (and only) pages apple-mobile-web- App-enabled and apple-touch-fullscreen meta tags, so that it can run fullscreen once in the home screen. However, it seems that every time I launch the app from the homescreen, instead of refreshing the page, the cash version of the page is used (and, of course, I need to update the page at startup, And here Ajax can not be used - it needs to be dynamically authenticate user with SSO phpCAS) I did not use any manifest file About cash without user attempts to add a meta tag. Does anyone know how to fix this?

Thanks

What have you tried the meta tag?

  & lt; Meta HTTP-EQUIV = "Cache-Control" CONTENT = "NO-CACHE" & gt; & Lt; Meta HTTP-EQUIV = "PRAGMA" CONTENT = "NO-CACHE" & gt;  

Do not tell the safari to cache, but I did not try them.

You can use any of your "real" startup pages from the cached page using javascript to make unique URLs unique, such as random numbers.

This can also work for the main startup page, but I doubt it. Try though.


I recommend that the cached page only loads a new page, if it is on the slider:

Invalid suggestion:

  Window.onload = function () {if navigator.standalone} {document.location.href = 'http://your.com/whatever.php?randomjunk=1234'}}}  
< P> So if the page is in the browser, it can give instructions on saving to the Home screen and if it is run from the Home screen, it will load the actual page.


No comments:

Post a Comment