AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Funciones específicas de la Web / Funciones del navegador
  • Limits
  • Miscellaneous
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Otros
Procedimientos almacenados
Writes a cookie onto the computer of the Web user.
WEBDEV - Código Servidor The cookie is written during the next display of a WEBDEV page in the browser.
WEBDEV - Código Navegador The cookie is written onto the computer of the Web user.
WEBDEV - Código ServidorPHPAjax
// -- Clic sur un bouton BTN_Valider (code serveur)
// Création d'un cookie: sauvegarde du nom de l'utilisateur
// et de la date de dernière visite
CookieWrite("NOM_ET_DATE", Nom + "," + DateSys())
PageDisplay(PAGE_Achats)
WEBDEV - Código NavegadorPHP
// -- Clic sur un bouton BTN_Enregistrer (code navigateur)
// Création d'un cookie: sauvegarde les options de recherche
CookieWrite("OPTRECHERCHE", MotClé + "," + ParIDENTIQUE)
Sintaxis
CookieWrite(<Cookie name> , <Cookie value> [, <Validity period> [, <Path> [, <Domain> [, <Type of cookie>]]]])
<Cookie name>: Character string
Name of the cookie that must be written onto the computer of the Web user. This name can be used during the call to CookieRead.
Caution: The ";" character cannot be used in the name of the cookie.
<Cookie value>: Character string
Value of the cookie to write onto the computer of the Web user. This value can be a list of data, various information, ... The maximum size of the character string cannot exceed 4000 characters.
Caution: The ";" character and the "Carriage Return" (CR) character cannot be used in the value of the cookie.
<Validity period>: Optional integer
Number of days during which the cookie is valid. Once this number of days is exceeded, the cookie is automatically deleted from the computer of the Web user. The cookie is valid for 30 days by default.
<Path>: Optional character string
Path for which the cookie must be saved. This path must exist on the server. This parameter is case-sensitive.
By default (or if this parameter corresponds to an empty string), the path corresponds to "/".
Example: "/COOKIES_WEB/FR/LOGIN"
<Domain>: Optional character string
Domain for which the cookie must be saved.
  • If this parameter is not specified or if it corresponds to an empty string, the domain corresponds to the current domain. The cookie will be associated with this domain only.
  • If this parameter explicitly corresponds to a domain name, the cookie will be associated with the specified domain name and with all its sub-domains.
<Type of cookie>: Optional Integer constant (or combination of constants)
Type of cookie to write:
cookieHTTPOnlyCookie that can be retrieved in server code only. This cookie cannot be read in browser code.
WEBDEV - Código Navegador This constant is not available.
cookieNormal
(Default value)
Cookie without specific options.
This constant cannot be combined with the other constants.
Novedad versión 2024
cookieSameSiteLax
Cookie of type "SameSite=Lax".. This type of cookie is used to prevent Cross Site Request Forgery (CSRF) attacks.
The Cookie concerned by this instruction will only be sent if the request comes from the same website or from another site via an external link..
Novedad versión 2024
cookieSameSiteNone
Cookie of type "Same Site=None".. This type of cookie is used to prevent Cross Site Request Forgery (CSRF) attacks.
Cookies will be sent regardless of the call context.
cookieSameSiteStrictCookie of "SameSite=Strict" type. This type of cookie is used to prevent Cross Site Request Forgery (CSRF) attacks.
The Cookie concerned by this instruction will only be sent if the request comes from the same website.. It will therefore not be sent on a first visit to an Page on the site, but only on subsequent actions.
cookieSecureCookie transmitted in an HTTPS request only.
Observaciones

Limits

  • The maximum size of a cookie cannot exceed 4000 characters. Up to 20 cookies can be written per domain.
  • WEBDEV - Código Servidor A single cookie can be written per page.
    Reminder: When the Web user connects to a WEBDEV website, the Web server loads all the cookies associated with the current domain in memory.
    Note: The Internet domain corresponds to a specific section of the Internet address: http://computer.domain.com/MyPages/Index.html.

Miscellaneous

  • Some browsers give you the ability to disable the cookies. In this case, CookieWrite has no effect.
  • If the name or the value of your cookie contains special characters (* for example), accented or UNICODE, the writing of the cookie may have no effect with some browsers.
Componente: wd290page.dll
Versión mínima requerida
  • Versión 9
Comentarios
SameSite=None option not available
We may have a site calling another website with SameSite=None with the secure attribute. This option is not currently available. Alternate method is to override the cookie with javascript to set the attibute
REJISH / BEO
17 10 2022

Última modificación: 22/02/2024

Señalar un error o enviar una sugerencia | Ayuda local