How can the issue of not being able to log out in Firefox while being permanently logged in be resolved in PHP?

Issue: The problem of not being able to log out in Firefox while being permanently logged in can be resolved by ensuring that the session is properly destroyed when the user logs out. This can be achieved by using the session_unset() function to clear all session variables and then using session_destroy() to destroy the session. PHP code snippet:

<?php
session_start();

// Unset all session variables
$_SESSION = array();

// Destroy the session
session_destroy();

// Redirect to the login page
header("Location: login.php");
exit;
?>