Sponsored Content
The Lounge What is on Your Mind? Individual Risk Management (Personal IT Security) and Browser Cache Management Post 303033321 by Neo on Wednesday 3rd of April 2019 07:46:19 AM
Old 04-03-2019
Quote:
Originally Posted by bakunin

...

Cookies are little files a web server places at the client side which can be queried by the server later. In most cases these are used for harmless functions - after all, HTTP does not create a "session" but works rather like a mail exchange. HTTP consists of independent messages going back and forth between sender and receiver and if one wants to provide lasting context (this is what sets apart "sessions" from "messages") either the web server has to remember it - which would lead to exhaustion of resources on the server side in a very short time - or the server has to have a way to offload that to the client. This was the original rationale for creating cookies and in general storing web content on the client side.
First. let me help you clarify.

Cookies are generally not "queried" by a server. Cookies are sent to the server with each page (that belong to the same cookie domain) as part of the standard HTTP request.

If you open any web dev tool, like Google Chrome Web Dev Tools (but it is the same with each major browser), you will see the cookies are sent with each page, not requested by the server.

Sorry, I just wanted to be technically correct.
 
CURLOPT_COOKIESESSION(3)				     curl_easy_setopt options					  CURLOPT_COOKIESESSION(3)

NAME
CURLOPT_COOKIESESSION - start a new cookie session SYNOPSIS
#include <curl/curl.h> CURLcode curl_easy_setopt(CURL *handle, CURLOPT_COOKIESESSION, long init); DESCRIPTION
Pass a long set to 1 to mark this as a new cookie "session". It will force libcurl to ignore all cookies it is about to load that are "ses- sion cookies" from the previous session. By default, libcurl always stores and loads all cookies, independent if they are session cookies or not. Session cookies are cookies without expiry date and they are meant to be alive and existing for this "session" only. A "session" is usually defined in browser land for as long as you have your browser up, more or less. DEFAULT
0 PROTOCOLS
HTTP EXAMPLE
TODO AVAILABILITY
Along with HTTP RETURN VALUE
Returns CURLE_OK SEE ALSO
CURLOPT_COOKIEFILE(3), CURLOPT_COOKIE(3), libcurl 7.54.0 February 03, 2016 CURLOPT_COOKIESESSION(3)
All times are GMT -4. The time now is 12:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy