# Session Cache

**URL:** https://forum.kirupa.com/t/session-cache/248535
**Category:** programming
**Created:** [January 9, 2008, 12:21pm UTC](https://forum.kirupa.com/t/session-cache/248535 "2008-01-09T12:21:59Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![taurus5\_6](https://avatars.discourse-cdn.com/v4/letter/t/9d8465/32.png) [@taurus5\_6](https://forum.kirupa.com/u/taurus5_6)
#### Post date: [January 9, 2008, 12:21pm UTC](https://forum.kirupa.com/t/session-cache/248535/1 "2008-01-09T12:21:59Z")

</div>

I am using session cookie to make sure that my website members login to access certain privileges. However, everytime the back button is used, the browser always RELOADS the entire page. If I remove my session in the script, the cache works well enough. How shall I fix it so that the browser does not have to reload the page everytime.

Here is the code I use at the first lines of my page:

```php

<?php
session_name('YourSessionID');
session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

```

the codes at the body:

```php
 
<body>
<?php
$id=$_SESSION['sess_id'];
?>
<table width="750" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFCC"><!--DWLayoutTable-->
  <tr>
    <td colspan="3" bgcolor="#FFFFFF">

```

Thanks :jail:
