BLOCK_COOKIES property

ContentBlockerActionType BLOCK_COOKIES
final

Strips cookies from the header before sending it to the server. This only blocks cookies otherwise acceptable to WebView's privacy policy. Combining with IGNORE_PREVIOUS_RULES doesn't override the browser’s privacy settings.

Officially Supported Platforms/Implementations:

  • iOS WKWebView
  • macOS WKWebView
  • Linux WPE WebKit

Implementation

static final BLOCK_COOKIES = ContentBlockerActionType._internalMultiPlatform(
  'block-cookies',
  () {
    switch (defaultTargetPlatform) {
      case TargetPlatform.iOS:
        return 'block-cookies';
      case TargetPlatform.macOS:
        return 'block-cookies';
      case TargetPlatform.linux:
        return 'block-cookies';
      default:
        break;
    }
    return null;
  },
);