dont cache pages or remove history?

greg's picture

He has: 1,581 posts

Joined: Nov 2005

I'm having a bit of trouble with some pages that are stored in users browser history

A list of items the user has uploaded to their account is displayed
they can use form tickboxes to select multiple items and click delete all

The problem I'm having is they go to next page where it displays all those items and asks for delete confirmation
then if they click "yes" it then displays "all items deleted" OR "sorry XX items couldnt be removed"

when they use browser back button later, it finds the confirm page with all items they selected, and the results page with all items where successfully deleted

and of course the items no longer exist, so I get page errors and file not found, or at best it displays the result as "items deleted successfully"

I have tried various methods to not cache pages, but of course it doesnt work as it's stored in their history or whatever
I have played with variables and sessions and clauses if session==1 then dont do this etc
but I have to send the data twice in post/get, once from the items list page (where they select tickboxes) to the confrim page, then once from the confrim page to the actual removal page
and var/session clauses just dont work as going FROM item list page TO the confirm page has to work
so when they go back to item list page (one with checkboxes) page later, it sets whatever var/session it needs to for the confrim page to work
but of course if they use back they eventually go BACK to the confirm page WITH the var allowing it to be displayed

How do you get around cached form data when users go back to a form page or form results page?

cheers

pr0gr4mm3r's picture

He has: 1,502 posts

Joined: Sep 2006

Here's an article that might help you -> http://www.htmlgoodies.com/beyond/reference/article.php/3472881

greg's picture

He has: 1,581 posts

Joined: Nov 2005

yeah cheers..I found that and it doesnt work
I tried a few variants too...header types but without any luck

just remembers the past pages which look terrible as they try to display data that doesnt exist (as it was deleted when they first hit on that page)

so i'm now trying to add all post data into a session so I can clear the session when deleted and then if session not set display nice message

decibel.places's picture

He has: 1,494 posts

Joined: Jun 2008

an old thread a new approach

Manipulating the Cache on Jennifer Kyrnin's About.com site uses different Meta Tags than the examples I have seen here

Haven't tested it but Jenn is usually spot on - and nice too, she will personally thank you by email for posting a cogent comment on the site (are you reading this Megan? Smiling )

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.