The WEB CLOSE SESSION command invalidates an existing session designated by the sessionID parameter. If the session does not exist, the command does nothing.
When this command is called from a Web process or any other process:
- The cookie expiration date is set to 0,
- The On Web Close Process database method is called, allowing you to store session information,
- Selections are erased, records are unlocked and variables are reset.
After this command is executed, if a Web client sends a request using an invalid cookie, a new session is opened and a new cookie is sent.
Note: In the context of a 4D Mobile session, the WEB CLOSE SESSION command closes the 4D Mobile session whose ID is passed in the sessionID parameter. Since a 4D Mobile session can manage several processes, this command actually requests all the Web processes related to the session to finish their execution.