Closed Bug 275447 Opened 20 years ago Closed 20 years ago

Form fields cleared when Back button pressed when using PHP session_start();

Categories

(SeaMonkey :: General, defect)

1.7 Branch
PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 268037

People

(Reporter: jkcarter, Unassigned)

References

()

Details

User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.5) Gecko/20041217 Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.5) Gecko/20041217 Returning to an HTML form that uses PHP sessions (which pass the cookie PHPSESSID) by using the Back button causes the form data to reset. Reproducible: Always Steps to Reproduce: 1. Go to http://maizecoop.cropsci.uiuc.edu/bugzilla4/index2.php 2. Type a search. 3. Press return. 4. Click the back button on your browser. Actual Results: The form field is now blank. Expected Results: The form fields contain the original data. This issue affects Mozilla 1.7.5 and Firebird 1.0. This issue does not affect Mozilla 1.7.3 or Firebird 1.0PR. This bug is similar to 268037. However, I have not altered the Cache-Control header at all. This is a separate issue.
no matter what you think you do, you do have Cache-Control: no-store set: 4 Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 hence, marking duplicate. *** This bug has been marked as a duplicate of 268037 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Alright, I see the problem now. Apparently, the default behavior of PHP's session_start() function is to send implicit Cache-Control headers. To override this behavior, use session_cache_limiter() to enable client caching. A full explanation can be seen at: <a href='http://us2.php.net/manual/en/function.session-cache-limiter.php'>http://us2.php.net/manual/en/function.session-cache-limiter.php</a>
You need to log in before you can comment on or make changes to this bug.