Cookie don't survive closing Browser?

I’m using Xojo 2016.2.1 and WebApps.

I set a cookie with:
Session.Cookies.Set(“Cookie_Username”, TextField_Username.Text)

And read it with:
If Session.Cookies.Value(“Cookie_Username”) <> “” Then
TextField_Username.Text = Session.Cookies.Value(“Cookie_Username”)
end if

On my mac, starting with the “RUN” Button. Everything’s works fine.

Compiled version at my webserver, and browsing it with OS X’s Safari don’t work normal:

When I open a new safari window, the cookie is loading again.
When I open another new safari window, the cookie is there again. Perfect.

But: When I close my Safari with CMD+Q and open the page again, the cookies are gone.

I tried some settings in Safari, e.g. “allow all cookies, even from websites I don’t visit.” But no chance. The Cookies are gone.

Have you set the expiration date ?

Without date, they are just session cookies.
So they stay only for the browser running.

@Michael You are the greatest! AGAIN!

I added the 2019/12/31 as exp. date, and it works! WOW! THANK YOU!