Test Website Cookies




Cookie Testing

What is Cookies?
Cookie is the type of record stored in the file on user’s drive by web servers. This record is later used to retrieve information by web browser from the related machine so that requested command can escape from the post back  otherwise all small commands will consume time to fetch data from server on each and all request. Offenly cookie holds personal user data or personal information that is used to communicate between two or more different-2 web pages.

Process of Two Stages:
Cookies contain two-stage process. In First stage cookie stores in the user's computer without user’s knowledge or consent. i.e. Web search engines like Google!, a user can select categories of interest from the available Web page. That Web server then creates a exact cookie, which is necessary to tagged string of text containing the user's choice, and it transmits specific cookie to the user's PC. The user's Web browser receives the cookie and stores it in a special text file, which is called cookie list. All This happens without any user consent or notification. As a result, Web server formatted the personal information (when user's category preferences), saved by user's PC  and transmitted.

During Second Stage, the cookie is automatically and clandestinely relocated from the machine or user to a Web server. Whenever users browse their Web browser to open a certain Web page from any server, the browser will, without the user's permission or knowledge transmitted the cookie containing private record to the Web server.  

Why Cookies should use?
Cookies can be used to identity and track the user navigation throughout the web site pages. It’s the stateless communication between web browser and web server.
i.e.  if you are browsing the domain https://www.mydomain.com/123.html
then web browser will send the query to webexample.com server for the page 123.html. Next time when you just type page http://www.mydomain.com/342.html then new request is send to webexample.com web server for sending 342.html page and web server don’t know anything about to whom the previous page 123.html served.

Let’s check previous history of same user communication with web server
We need to maintain the interaction and user state between web server and web browser. Here cookie comes into picture. Cookies will serve the use of maintaining the user communication with web server.


Cookie testing delete cookies, what are browser cookies, how to remove cookies, test cookies, test website testing for remove clear cookie, all about cookies, cookies testing for web application, cookies testing on multiple browsers



How cookies work?


To maintain the cookies web used the HTTP protocol to exchange information files on the web. Two types of HTTP protocol are Stateful HTTP protocol  and Stateless HTTP. Stateless HTTP protocol never keep any record for previously browsed web page history. While State full HTTP protocol always keep history of previous accessed and web server communication and only this protocol is used by cookies to maintain the user communication.


An Example code that is used to develop the cookie and used inside any HTML page:


Set-Cookie: NAME=VALUE;

expires=DATE; path=PATH;

domain=DOMAIN_NAME;

Whenever user will visit the required web page or domain, then later this cookie will be read from disk and then used to recognize the next visit of the same user on same web page. Expiration time will also be set while developing the cookie. This time will be decided by the web application that will use the cookie.



Generally user machine required two types of cookies:



1.  Session cookies: This cookie works along with the session is live in active browser as soon as browser will be closed, session cookies will be deleted automatically. Session timing can be set by developer as per required. Session cookies are like temporary cookies.

2. Persistent cookies: Or permanent cookies that are worked permanently on user PC and remained continue for the years or months.



The place of cookies gets stored



Cookies generally get saved in a text file on user’s hard disk drive. The path of cookies storage is only depends on the browser. Browsers have different place to store cookie in different paths.

For Example-  Internet explorer path for cookies “C:\Documents and Settings\Default User\Cookies

 “Default User” mean the current user who logged in as i.e. “Administrator”, or user name like “John” etc.



By navigating the browser options, cookies path can be found.
Mozilla Firefox browser cookies can be found here:
Browser the Mozilla browser
Click on Tools->Options->Privacy and then “Show cookies” button.
  


How cookies store?
Good example of cookies written on Mozilla Firefox browser by rediff.com:
When you browse the rediff.com on Mozilla Firefox browser or login into rediff.com mail account, then cookie will get stored on PC Hard disk. To see this cookie just click on “Show cookies” button mentioned on provided path above. You Just Need to Click on Rediff.com site which is coming in this cookie list. You can see different-2 cookies stored by rediff.com domain with different-2 names.

Site: Rediff.com Cookie name: RMID

Cookie Name: RMID (Name of the cookie)

Content: 1d11c8ws23er49e0… (Encrypted Type content)

Domain: rediff.com

Path of cookie: / (Any path after the domain name)

Send For: All types of connections

Expires: Friday, Feb 29, 2021 12:58:58 AM

Cookie Testing
Cookie Testing


No comments:

Post a Comment

Popular Posts