How to clear Web Viewer cookies in App Inventor
The WebViewer built into App Inventor and Thunkable doesn't have any methods built into it that allow you to clear cookies the only methods which are available are to clear the Web Viewers cache, however thanks to an extension created by us at ThunkableBlocks you can now clear a Web Viewers cookies with ease.
To clear cookies from your app simply use the ClearCookies block, this clears cookies based on the app rather than a WebView so if you have multiple Web Viewers in your application this will clear the cookies from all of them.
The event "CookiesRemoved" can also be used to find out whether any cookies were removed when the function was run, the variable "isCookiesRemoved" returns true if there were cookies removed, or false if there were no cookies to remove.
You can also check if there are any cookies currently set by using the "HasCookies" method, this returns true if there are cookies set, or false if there are no cookies set.
For full documentation and a link to download the extension check out the WebViewCookieTools Extension page.
Was this helpful?
Comments
Post a Comment