Platforms to show: All Mac Windows Linux Cross-Platform

Back to LinuxWebCookieMBS class.

LinuxWebCookieMBS.Constructor(name as string, value as string, domain as string, path as string, maxAge as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method HTMLViewer Linux MBS Linux Plugin 12.4 ❌ No ❌ No ✅ Yes ❌ No Desktop only
Creates a new cookie with the given attributes.
Example
dim c as new LinuxWebCookieMBS("test", "12345", "mbsplugins.de", "", LinuxWebCookieMBS.kMaxAgeWeek)
MsgBox str(c.Name)

Use Secure and HTTPOnly properties if you need to set those attributes on the returned cookie.

maxAge is used to set the "expires" attribute on the cookie; pass -1 to not include the attribute (indicating that the cookie expires with the current session), 0 for an already-expired cookie, or a lifetime in seconds. You can use the constants kMaxAgeHour, kMaxAgeDay, kMaxAgeWeek and kMaxAgeYear (or multiples thereof) to calculate this value. (If you really care about setting the exact time that the cookie will expire, use Expire property.)

name: cookie name
value: cookie value
domain: cookie domain or hostname
path: cookie path, or ""
maxage: max age of the cookie, or -1 for a session cookie

LinuxWebCookieMBS.Copy as LinuxWebCookieMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method HTMLViewer Linux MBS Linux Plugin 12.4 ❌ No ❌ No ✅ Yes ❌ No Desktop only
Creates a copy.

If you want to edit an existing cookie, please make a copy first.

LinuxWebCookieMBS.Destructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method HTMLViewer Linux MBS Linux Plugin 12.4 ❌ No ❌ No ✅ Yes ❌ No Desktop only
The destructor.

LinuxWebCookieMBS.Domain as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property HTMLViewer Linux MBS Linux Plugin 12.4 ❌ No ❌ No ✅ Yes ❌ No Desktop only
The domain text.
Example
dim c as new LinuxWebCookieMBS("test", "12345", "mbsplugins.de", "", LinuxWebCookieMBS.kMaxAgeWeek)
MsgBox str(c.Domain)

(Read and Write computed property)

LinuxWebCookieMBS.Equal(other as LinuxWebCookieMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method HTMLViewer Linux MBS Linux Plugin 12.4 ❌ No ❌ No ✅ Yes ❌ No Desktop only
Compares two cookies.

Returns true if they are equal.

LinuxWebCookieMBS.Expires as date

Type Topic Plugin Version macOS Windows Linux iOS Targets
property HTMLViewer Linux MBS Linux Plugin 12.4 ❌ No ❌ No ✅ Yes ❌ No Desktop only
The expiration time.
Example
dim c as new LinuxWebCookieMBS("test", "12345", "mbsplugins.de", "", LinuxWebCookieMBS.kMaxAgeWeek)
MsgBox c.Expires.ShortDate+" "+c.Expires.ShortTime

If expires is nil, cookie will be a session cookie and will expire at the end of the client's session.
(Read and Write computed property)

LinuxWebCookieMBS.ExpiresDateTime as DateTime

Type Topic Plugin Version macOS Windows Linux iOS Targets
property HTMLViewer Linux MBS Linux Plugin 20.5 ❌ No ❌ No ✅ Yes ❌ No Desktop only
The expiration time.

(Read and Write computed property)

LinuxWebCookieMBS.HTTPOnly as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property HTMLViewer Linux MBS Linux Plugin 12.4 ❌ No ❌ No ✅ Yes ❌ No Desktop only
The httponly attribute.

If true, cookie will be marked as "http only", meaning it should not be exposed to web page scripts or other untrusted code.
(Read and Write computed property)

LinuxWebCookieMBS.Name as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property HTMLViewer Linux MBS Linux Plugin 12.4 ❌ No ❌ No ✅ Yes ❌ No Desktop only
The name of the cookie.
Example
dim c as new LinuxWebCookieMBS("test", "12345", "mbsplugins.de", "", LinuxWebCookieMBS.kMaxAgeWeek)
MsgBox str(c.Name)

(Read and Write computed property)

LinuxWebCookieMBS.Path as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property HTMLViewer Linux MBS Linux Plugin 12.4 ❌ No ❌ No ✅ Yes ❌ No Desktop only
The path of the cookie.
Example
dim c as new LinuxWebCookieMBS("test", "12345", "mbsplugins.de", "test", LinuxWebCookieMBS.kMaxAgeWeek)
MsgBox str(c.Path)

(Read and Write computed property)

LinuxWebCookieMBS.Secure as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property HTMLViewer Linux MBS Linux Plugin 12.4 ❌ No ❌ No ✅ Yes ❌ No Desktop only
The secure attribute.
Example
dim c as new LinuxWebCookieMBS("test", "12345", "mbsplugins.de", "", LinuxWebCookieMBS.kMaxAgeWeek)
MsgBox str(c.Secure)
c.Secure = true
MsgBox str(c.Secure)

Cookie will only be transmitted from the client to the server over secure (https) connections if secure is true.
(Read and Write computed property)

LinuxWebCookieMBS.SetMaxAge(value as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method HTMLViewer Linux MBS Linux Plugin 12.4 ❌ No ❌ No ✅ Yes ❌ No Desktop only
Sets cookie's max age to value.
Example
dim c as new LinuxWebCookieMBS("test", "12345", "mbsplugins.de", "", LinuxWebCookieMBS.kMaxAgeHour)
c.SetMaxAge(c.kMaxAgeWeek)
MsgBox c.ToSetCookieHeader

If max_age is -1, the cookie is a session cookie, and will expire at the end of the client's session. Otherwise, it is the number of seconds until the cookie expires. You can use the constants kMaxAgeHour, kMaxAgeDay, kMaxAgeWeek and kMaxAgeYear (or multiples thereof) to calculate this value. (A value of 0 indicates that the cookie should be considered already-expired.)

(This sets the same property as Expire.)

LinuxWebCookieMBS.ToCookieHeader as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method HTMLViewer Linux MBS Linux Plugin 12.4 ❌ No ❌ No ✅ Yes ❌ No Desktop only
Serializes cookie in the format used by the Cookie header (ie, for returning a cookie from to a server).
Example
dim c as new LinuxWebCookieMBS("test", "12345", "mbsplugins.de", "", LinuxWebCookieMBS.kMaxAgeWeek)
MsgBox c.ToCookieHeader

LinuxWebCookieMBS.ToSetCookieHeader as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method HTMLViewer Linux MBS Linux Plugin 12.4 ❌ No ❌ No ✅ Yes ❌ No Desktop only
Serializes cookie in the format used by the Set-Cookie header (ie, for sending a cookie from to a client).
Example
dim c as new LinuxWebCookieMBS("test", "12345", "mbsplugins.de", "", LinuxWebCookieMBS.kMaxAgeWeek)
MsgBox c.ToSetCookieHeader

LinuxWebCookieMBS.Value as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property HTMLViewer Linux MBS Linux Plugin 12.4 ❌ No ❌ No ✅ Yes ❌ No Desktop only
The value of the cookie.
Example
dim c as new LinuxWebCookieMBS("test", "12345", "mbsplugins.de", "", LinuxWebCookieMBS.kMaxAgeWeek)
MsgBox str(c.Value)

(Read and Write computed property)

The items on this page are in the following plugins: MBS Linux Plugin.


The biggest plugin in space...