Caching question

C

Chris Patten

I have 2 asp pages, the first displays a drop down which it's source is from a db, user picks a value, submits to the next page. Currently if the user hits back picks a different value and submits again, the same original value is submitted again, not the newly select value...I see lots of things talking about caching, wondering if there is something I can do so if the user goes back, using their back button, that if they select the new value and resubmit, that the new value is used and not the original value, I may have said that in a very long winded way, just wanted to be clear...tia if you have advice.
 
K

Keon

Put this line of code on the top of your page. It makes thet the browser
not cache this page

<%Response.Expires = -1000 %>

greets
Keon


Chris Patten said:
I have 2 asp pages, the first displays a drop down which it's source is
from a db, user picks a value, submits to the next page. Currently if the
user hits back picks a different value and submits again, the same original
value is submitted again, not the newly select value...I see lots of things
talking about caching, wondering if there is something I can do so if the
user goes back, using their back button, that if they select the new value
and resubmit, that the new value is used and not the original value, I may
have said that in a very long winded way, just wanted to be clear...tia if
you have advice.
 
A

Aaron [SQL Server MVP]

http://www.aspfaq.com/2022

--
http://www.aspfaq.com/
(Reverse address to reply.)




Chris Patten said:
I have 2 asp pages, the first displays a drop down which it's source is
from a db, user picks a value, submits to the next page. Currently if the
user hits back picks a different value and submits again, the same original
value is submitted again, not the newly select value...I see lots of things
talking about caching, wondering if there is something I can do so if the
user goes back, using their back button, that if they select the new value
and resubmit, that the new value is used and not the original value, I may
have said that in a very long winded way, just wanted to be clear...tia if
you have advice.
 
A

Aaron [SQL Server MVP]

FYI... that line alone won't cover all browsers and all settings.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top