---
title: Extending the lifetime of the PingFederate cookie
description: PingFederate identifies sessions by their respective PingFederate cookies. You can manually extend the lifetime of these cookies.
component: pingfederate
version: 13.0
page_id: pingfederate:administrators_reference_guide:pf_extend_lifetime_of_pf_cookie
canonical_url: https://docs.pingidentity.com/pingfederate/13.0/administrators_reference_guide/pf_extend_lifetime_of_pf_cookie.html
revdate: July 5, 2022
section_ids:
  about-this-task: About this task
  steps: Steps
---

# Extending the lifetime of the PingFederate cookie

PingFederate identifies sessions by their respective PingFederate cookies. You can manually extend the lifetime of these cookies.

## About this task

Some adapters, such as the HTML Form Adapter, also utilize the PingFederate cookie to manage their adapter-sessions. The PingFederate cookie is a session cookie by default. You can extend the lifetime of the PingFederate cookie by making it a persistent cookie. Unlike session cookies, persistent cookies are saved to disk, enabling the browser to reuse them when restarted.

|   |                                                                                                                                                                                                                                           |
| - | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|   | Alternatively, you can configure PingFederate to store authentication sessions externally and leverage them as users request protected resources after restarting their browsers. For more information, see [Sessions](pf_sessions.html). |

## Steps

1. Edit the `session-cookie-config.xml` file, located in the `<pf_install>/pingfederate/server/default/data/config-store` directory.

2. Modify the `cookie-max-age` value.

   The default value, `-1`, makes the PingFederate cookie a session cookie. A positive integer defines the age of the persistent cookie in seconds.

3. Save the change.

4. Restart PingFederate.

   For a clustered PingFederate environment, perform these steps on the console node, and then click **Replicate Configuration** on **System > Server > Cluster Management**.
