WebView.SetUsePrivateBrowsing
Sets private browsing desire.
Component |
Version |
macOS |
Windows |
Linux |
Server |
iOS SDK |
WebView
|
11.3 |
✅ Yes |
❌ No |
❌ No |
❌ No |
❌ No |
MBS( "WebView.SetUsePrivateBrowsing"; Value )
More
MBS(
"WebView.SetUsePrivateBrowsing"; /* Sets private browsing desire. */
$Value) /* The new setting.
Pass 1 to enable private browsing or 0 to disable.e.g. 1 */
Less
Parameters
Parameter |
Description |
Example |
Value |
The new setting.
Pass 1 to enable private browsing or 0 to disable. |
1 |
Result
Returns OK or error.
Description
Sets private browsing desire.
You call this before a WebViewer is created and make your wish.
When FileMaker creates a WebViewer, we intercept and if you like to have private browsing, we switch to a non persistent data storage. Then we let FileMaker continue.
You would do a script like this:
- Call MBS("WebView.SetUsePrivateBrowsing"; 1)
- Go to a layout with web viewer
- Load an URL
- Script pause for maybe 0.1 seconds to let FileMaker create web viewer.
- You can call WebView.SetUsePrivateBrowsing again pass 0.
If you like to be all Web Viewers in FileMaker be private, just call WebView.SetUsePrivateBrowsing once on startup in your start script. The setting persists till you disable it or FileMaker quit.
If you have two web viewer with both private browsing, you can login into the same website with two different accounts. Normally those would share the cookies and two accounts won't work.
Examples
Try private browsing:
# enable private browsing for next Web Viewer created
Set Variable [ $r ; Value: MBS( "WebView.SetUsePrivateBrowsing"; 1 ) ]
# Load a layout with Web Viewer
Go to Layout [ “WebViewerLayout” (Test) ; Animation: None ]
# Load a website
Set Web Viewer [ Object Name: "web" ; URL: "https://www.google.com/" ]
# And give FileMaker some time to create the web viewer!
Pause/Resume Script [ Duration (seconds): ,3 ]
# Going back to default to regular data source.
Set Variable [ $r ; Value: MBS( "WebView.SetUsePrivateBrowsing"; 0 ) ]
See also
Release notes
Blog Entries
This function checks for a license.
Created 11st June 2021, last changed 12nd June 2021
WebView.SetTitle
-
WebView.ShowDebugBar