The SameSite attribute is used in cookies to control how they are sent in cross-origin requests. It provides a way for websites to declare whether cookies should be restricted to the same site or same-site origin.

The SameSite cookie can have three possible values:

  1. Strict
  2. Lax
  3. None

The use of the SameSite attribute helps mitigate certain types of cross-site request forgery (CSRF) attacks by preventing cookies from being sent in cross-origin requests. It provides developers with more control over how cookies are handled and helps protect user privacy.

To set SameSite cookie in xampp server follow below steps

Step 1: Open Xampp control panel and click Apache(httpd.conf)

Step 2: Add Below line and restart apache server

For Apache >= 2.2.4
Header edit Set-Cookie ^(.*)$ $1;SameSite=Strict

For Apache < 2.2.4
Header set Set-Cookie SameSite=Strict

To check the SameSite status of a cookie in Chrome, you can follow these steps:

1 . Launch the Google Chrome browser on your computer.

2. Right-click anywhere on the webpage and select “Inspect” from the context menu. Alternatively, you can press Ctrl+Shift+I

3. In the Developer Tools panel, you’ll see several tabs at the top. Click on the “Application” tab.

4. In the left-hand sidebar of the Application tab, you’ll find a list of categories. Locate and expand the “Storage” section.

5. Under the Storage section, click on “Cookies” and select website