Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 7.1   7.2   7.3   7.4   7.5   8.0   8.1   8.2   8.3   8.4    Statistic  

Webview.AllCookies

Returns all website cookies as JSON.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
Webview 8.4 Yes No No No Yes

MBS( "Webview.AllCookies"; WebViewerRef )

Parameters

Parameter Description Example value
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.

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

Created 11st August 2018, last changed 11st August 2018


Webview.AddScriptMessageHandler   -   Webview.RemoveScriptMessageHandler

Feedback: Report problem or ask question.




Links
MBS Xojo Plugins