PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Checking the management of cookies
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Retrieves the value of a cookie saved on the computer of Web user.
// Retrieves the name and date of last visit
NameAndDate is string
NameAndDate = CookieRead("NAMEANDDATE") // NAMEANDDATE: name of the cookie
IF NameAndDate = "" THEN
// first visit
MyMessage = "Welcome, new visitor!"
ELSE
TheName = ExtractString(NameAndDate, 1, ",")
MyMessage = "Welcome " + TheName
TheDate = ExtractString(NameAndDate, 0, ",")
END
Syntax
<Result> = CookieRead(<Cookie Name>)
<Result>: Character string
  • Value of cookie,
  • Empty string ("") if the cookie does not exist on the computer of Web user.
<Cookie Name>: Character string with quotes
Name of cookie that will be read on the computer of Web user. This name was used when the cookie was created by CookieWrite.
Remarks
WEBDEV - Server codePHPAjax

Checking the management of cookies

CookieRead has no effect in test mode (WEBDEV site started by "Project .. Test mode .. Run the project test").When a site is started in test mode ( among the quick access buttons), CookieRead has no effect.
To check the management of cookies in your site (on the development computer), your site must be started from the test page of WEBDEV administrator.
Caution: make sure that no test connection remains active in the WEBDEV administrator (WD230Admin).
  • The cookies written in server code cannot be read in browser code.
  • The cookies written in browser code cannot be read in server code.
  • WEBDEV - Server code CookieRead can only be used to read the cookies loaded in memory. The cookies written during the current session cannot be read.
    Reminder: When the Web user connects to a WEBDEV site, 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.
  • WEBDEV - Server code Reminder: When the Web user connects to a WEBDEV site, 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.
  • WEBDEV - Browser code In browser code, CookieRead directly reads the value of the specified cookie on the computer of the Web user.
  • Versions 20 and later
    If your project is using cached sessions, this function must not be used in the "Initializing the project" process. This function must be used in the "Initializing the project after connection to the site" process.
    New in version 20
    If your project is using cached sessions, this function must not be used in the "Initializing the project" process. This function must be used in the "Initializing the project after connection to the site" process.
    If your project is using cached sessions, this function must not be used in the "Initializing the project" process. This function must be used in the "Initializing the project after connection to the site" process.
Components
WEBDEV - Server code wd230page.dll
Linux wd230page.so
WEBDEV - Browser code WDJS.DLL
Minimum required version
  • Version 9
Comments
Click [Add] to post a comment