Problem with HTMLViewer cookies on a Xojo Desktop application

In my Xojo Desktop application I have a window with a small browser with HTMLViewer (with renderer “WebKit”) that loads an internet page of an external website (not mine).

But when the page loads, this message appears:

In practice it tells me: “disable the blocking of cookies in your browser settings and make sure you have installed the latest version”

This happens in both macOS and Windows.
My application was made with Xojo 2019r1.1, but I have the same problem with Xojo 2022r3.2.

How can I enable cookies?

P.S. If I use rederer “Native” the message does not appear but then it does not read very well the website’s style sheets.

Thank you.

Are you sure this happens on macOS? The HTMLViewer should be using the exact same engine regardless if it’s set to native or WebKit.

I get Windows where it uses the Chromium engine.

On Mac it always appears. In Windows only in “WebKit”.

So it’s even worse than I thought.

No solution for the cookie problem?

You may want to set the user-agent. For instance “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36”.

1 Like

You can use MBS Xojo Plugins to get an alternative HTMLViewer.

See WebView2ControlMBS, WKWebViewControlMBS or WKWebViewIOSControlMBS.

1 Like