Cookies may be of two types
Session Cookies : Session cookies is the cookies that will expire after you have logged off the websites.
Persistent Cookie : Persistent cookie remain your system even and after you have logged off from the websites.
Following Kinds of information cookies are stored in your system
1 . Name of Cookies
2. Cookie expiration
3. Unique ID
When you visit again same website the websites server matches that unique id with their own database and load that websites according to your browsing Cookies history.
There are two types
Normal cookies: These cookies are stored by the websites that you visited. that are trusted cookies which are not harmful for our system.
Go to chrome setting->privacy and security->cookies and other site data->click on block all cookies.
- Go to chrome setting->privacy and security->cookies and other site data->click on Block third-party cookies.
-You can also block allow cookies from there and improve your browsing experience for example keep me signed in or to remember.
- Go to chrome setting->privacy and security->cookies and other site data->click on Allow all cookies.
You can store create, read, update and delete the cookies
Cokies in codeigniter
You can set cookies using set_cookie function
$name = Name of the cookie
$value = Cookie data
$expire =Cookie expiry time
$domain = name of the domain on which you set the cookie
$path = cookie path
$prefix = cookie name aliases
$secure = send the cookie through HTTPS or HTTP
$this->input->set_cookie($name, $value, $expire, $domain, $path, $prefix, $secure);
echo get_cookie($name );