ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Web-specific functions / Browser functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Retrieves the value of a cookie saved on the computer of Web user.
// Récupère le nom et la date de la dernière visite
NomEtDate is string
NomEtDate = CookieRead("NOMETDATE") // NOMETDATE: nom du cookie
IF NomEtDate = "" THEN
	// première visite
	MonMessage = "Bienvenue, nouveau visiteur!"
ELSE
	LeNom = ExtractString(NomEtDate, 1, ",")
	MonMessage = "Bienvenue " + LeNom
	LaDate = ExtractString(NomEtDate, 0, ",")
END
Syntax
<Result> = CookieRead(<Cookie name>)
<Result>: Character string
  • Value of the cookie,
  • Empty string ("") if the cookie does not exist on the computer of Web user.
<Cookie name>: Character string
Name of the cookie to be read on the user computer. This name was used when the cookie was created by CookieWrite.
Remarks
  • WEBDEV - Server code Reminder: When an Internet user connects to a WEBDEV site, the Web server loads all the cookies associated with the current domain into its memory..
    Note: The Internet domain is a specific part of the Internet address: http://machine.domaine.com/MesPages/Index.html.
  • WEBDEV - Browser code In browser code, CookieRead directly reads the value of the specified cookie on the user's computer.
  • If your project uses pre-launched sessions, this function must not be used in the project initialization event. This function must be used in the "Initialization in pre-launched session mode" event.
Business / UI classification: UI Code
Component: wd300page.dll
Minimum version required
  • Version 9
Comments
Click [Add] to post a comment

Last update: 09/11/2024

Send a report | Local help