Hi,

I use a submit button to go to next page with posting a value. When i click on back (button in the browser) to go back to previous page, it says "Page is expired. Information must be send to display this page erc etc". I don't want to face this popup question.

How do i solve this problem?

Thanks

If you use your own button to go to the page (by address) you shouldn't have the problem. On the other hand, if you wanted to go back with values you previously entered populated into a form, then the second page will need a form with your submit button and some hidden variables to pass back the values (with the values in the original form defined with variable names that you will set).

Or use method="get" instead of method="post" to pass request parameters when the page is originally requested.

Airshow

1. I don't want to add submit button in next page for sending POST values back to original page. I knew this but it is not the case here.

2. I don't want expose values in URL

3. No Javascript too.

4. I hope i don't want something impossible

Thanks

Veledrom,

I'm afraid that rule 4 applies.

For most users (probably not all?) when they revisit a page that was originally requested with POST data, then the browser will ask its question.

As far as I'm aware, the only ways round this are (a) re-request with the same POST data, or (b) quesuest with GET instead of POST.

Unless someone wings in with something I don't know about, then you're snookered. :'(

Airshow

You can try this function

header("Cache-Control: private");

at the start of your page to which the back button refers.

Hi Manuz, header("Cache-Control: private"); has solved my problem. Thanks

We also have learned that nothing is impossible!!!

Well done Manuz. That's one to remember.

Veledrom - I withdraw "snookered" with apologies for my pessimism.

Airshow

No problem. Any answer is a help.

I have to admit to realising I have gaps in my knowledge about the fundamentals of HTTP but never finding the time to correct the problem.

I've just read the followig pages and now wonder how I've managed to do web work for the last 10+ years!!

There's a whole new world out there - a completely different way of seeing things.

This stuff (and a whole lot more I'm sure) is a "must read" for anyone and everyone doing web work.

Many thanks to Manuz for pointing me in the right direction.

Airshow

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.