Hello, in my app i use à local Webview.
But the page openning by it is changed every ten jours but my app keep old Web page.
It must be Cookie… If you can help me…
Thanks
Hello, in my app i use à local Webview.
But the page openning by it is changed every ten jours but my app keep old Web page.
It must be Cookie… If you can help me…
Thanks
You can add an unique URL parameter to it. That normally tells the web server that is a new request and shouldn’t send a cached version of the page, and if it is being cached locally, by changing the URL parameter, you work around the cache since it technically is a different URL.
So do something like:
local urlToOpen = "http://www.google.com/?nocache=" .. os.time()
or if the URL already has parameters, do:
local urlToOpen = "http://www.google.com/?id=123&nocache=" .. os.time()
(You are adding ?nocache if its the only URL parameter, or &nocache if there already are other URL parameters.)
Then use the variable urlToOpen as the URL to open in the webview.
OK i Will test Thanks you.
But why à os time
now my code is :
local urlToOpen = “http://www.magicpronostics.com/LMJ/index.html?nocache=” … os.time()
webView = native.newWebView( display.contentCenterX, display.contentCenterY+103, 720, 1160 )
webView:request( urlToOpen)
there is no modification in the front office of my app.
mu it must be in back office…
You can add an unique URL parameter to it. That normally tells the web server that is a new request and shouldn’t send a cached version of the page, and if it is being cached locally, by changing the URL parameter, you work around the cache since it technically is a different URL.
So do something like:
local urlToOpen = "http://www.google.com/?nocache=" .. os.time()
or if the URL already has parameters, do:
local urlToOpen = "http://www.google.com/?id=123&nocache=" .. os.time()
(You are adding ?nocache if its the only URL parameter, or &nocache if there already are other URL parameters.)
Then use the variable urlToOpen as the URL to open in the webview.
OK i Will test Thanks you.
But why à os time
now my code is :
local urlToOpen = “http://www.magicpronostics.com/LMJ/index.html?nocache=” … os.time()
webView = native.newWebView( display.contentCenterX, display.contentCenterY+103, 720, 1160 )
webView:request( urlToOpen)
there is no modification in the front office of my app.
mu it must be in back office…