Skip to main content

Major Difference between Cookie vs Tokens



              Major Difference between Cookies vs Tokens


 Cookies and Tokens are the way through which you authenticate your SPA(Single-page Applications) as well as other web-based applications. But the current scenario of development prefers Tokens based authentication over Cookie-based authentication.




            The major difference between Cookie and Tokens are:
  • Cookie-based authentication used as a default method for authentication and it used for a long time(traditional way of authentication).
  • In cookie-based authentication, an authentication record must be kept the server and client-side and the server needs to keep track of active sessions in the database.
  •  Whereas in Token-based authentication has become more popular nowadays because it uses a lot in Web-apps, APIs and SPA(Single-page Application).
  •  The token-based authentication server does not keep the record of the user login. Basically, when we talking about tokens it is authentication with  (JWT)JSON web tokens.
         
In this authentication authorization head in form of JWT(JSON web tokens) but it also sent in the body of  POST request or query parameters. Token-based authentication also used with various web frameworks like React, Vue, Backbone which used as making single-page applications.

So, tokens based authentication basically JSON web tokens are used on a large scale nowadays to authenticate the web-apps and other applications. The major advantages of JWT or tokens are it is stateless, scalable and having better performance and also protected from attacks like(XSS).
        

Comments

Popular posts from this blog

Rising of the AI in the human centric Development

Rising of the AI in the human centric Development The rising of the artificial intelligence in later 90's have make a rapid impact in field of technology and from 21st century the blooming of a mechanism makes several impact in various industries including software, education, healthcare and many more. As the world becomes increasingly reliant on technology, the role of  artificial intelligence  (AI) in human-centric development has risen to the forefront. From healthcare to transportation to education, AI is being used to improve the lives of people around the globe. Major areas where artificial intelligence AI makes an Impact One area where AI has made significant strides is in the healthcare industry. AI-powered virtual assistants can now assist doctors in diagnosing and treating patients, freeing up valuable time for medical professionals. In addition, AI-powered wearable devices can track a person's health and alert them to any potential issues. The transportation industr...

How to calculate Running Time of an algorithm

                                            Calculate Running Time of an Algorithm The running time of algorithm defines the time required to execute an algorithm on the given set of inputs(n). There are mainly three types of complexity cases defines to measure the running time of an algorithm also known as Asymptotic analysis. 1) Best Case : Best case also called ( Ω) omega  notation which measure the best case scenario of how long an algorithm can possible take to complete given operation on (n) inputs. It's also known as lower bound. 2) Average Case : It represents by ( Θ) theta  notation which measure the average time requires to complete a given operation on set of inputs. It measures between upper and lower bound running time and calculate average running time. 3) Worst Case: It defines the worst case running time of an algorithm. Also represent using ( Ο) Big-o...

When to Use HeatMap plot for Visualization of Data

HeatMap (Matrix) Plot Visualization for the Data: When to Use? Visual representation always helps in simplification either any real world entities or the data. Visualization  provides an pictorial representation so anyone can easily understand about the data and their insights(what they are representing and in which range the value is lying.                                                                                                                                                             Source: HeatMap Now when the data science becomes one of the popular domain in Computer science. It m...