Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

WebView.AllCookies

Returns all website cookies as JSON.

Component Version macOS Windows Linux Server iOS SDK
WebView 8.4 ✅ Yes ✅ Yes ❌ No ❌ No ✅ Yes
MBS( "WebView.AllCookies"; WebViewerRef )   More

Parameters

Parameter Description Example
WebViewerRef Either the Web Viewer Object Name or the Web Viewer ID as returned by "WebView.FindByName" function.

Result

Returns OK or error.

Description

Returns all website cookies as JSON.
For WebKit 1.x, this returns global list of cookies.

For WebKit 2.x, this returns list of cookies associated to the web viewer, which may be a persistent list. For WebKit 2.x we need MacOS 10.13 or iOS 11.0 to work.

Windows support added for version 13.1. JSON objects have objects with name, domain, value, path, sessionOnly, HTTPOnly and expires with the time value in seconds. e.g. use TimeStamp ( Date ( 1 ; 1 ; 1970 ); Time ( 0; 0; 0 )) + $expires to calculate final timestamp on Windows.

We added expires for macOS to have same value available.

Examples

Get all cookies:

Set Field [ WebView SelectedText::Cookies ; MBS("Webview.AllCookies"; "web") ]

Example result:
[ { "domain" : "www.filemaker.com", "secure" : false, "HTTPOnly" : false, "commentURL" : null, "portList" : [ ], "expiresDate" : "2027-11-03 21:43:00 +0000", "value" : "192.123.25.13.123456789", "path" : "\/", "comment" : null, "name" : "fmi_cookie", "sessionOnly" : false } ]

See also

Release notes

Blog Entries

This function checks for a license.

Created 11st August 2018, last changed 23th February 2023


WebView.AddUserScript - WebView.AllowsAnyHTTPSCertificateForHost