Reloading a page via a Back button
Is there a way in ASP to make a page reload either through the broswers back button or a forms?
What you want to do is make the page non-cacheable so the page is always reloaded.
Add this to the top of your webpage:
<% Response.CacheControl = "no-cache" %>
<% Response.AddHeader "Pragma", "no-cache" %>
<% Response.Expires = -1 %>
Thanks alot, that did the trick. You guys rock here.
Also have a look in the IIS setup, there is an headers option that globally sets this.
Look under properties --> http headers --> Tick enable content headers --> Set Expire immediately
I was also wondering if some one wouldn't mind taking a look at this for me, as it is sort of stumping me.
I'm builiding an online insurance application, where people input thier data, and it gives them rates, then lets them apply.
Here is the url: http://22.214.171.124/test4/
You will need to supply a valid zip, as it does a check for areas the insurance is available. You can use 23834
The issue I'm having is on the the next page there, intro-page2.asp, if you fill in your information or select add a child and then submit that, it takes you to the page with your quotes. No problem there. The problem is that if you use either the back button I have on the page or the browsers in IE, nothing is retained and the dropdowns disappear. But in FF, everything is fine.
Is this a cookie issue or something security wise related to IE? IE has become a real thorn in my side on this project.
Thanks as always for the assiatance.
As its an ASP page it will be reloading from scratch (i am guessing)
Saving the information in session variables and displaying them, set the sessions to blank to start with, so that even on the first load it will load them (just nothing to show).
Then hopefully if someone clicks back it might display them for you.
I think the problem with the back button is it behaves differently in different circumstances, and not always as we would like. I'd try and discourage the user from pressing it.
I feel much the same way, we are adding our own navigation, as I really don't want to rely on the browsers buttons. But, in my case here, thats not really the issue. The real reason I'm jumping through all these hoops is because of the dynamically created "Add Child" elements on the page.
I guess the irrating part for me is that in FF, even with the page reload, it will keep the session variables as you described above. But of course, IE doesn't want to play nice. I've tried to re-intialize the page(call the JS function) through several diffrent means, but thus far no luck. I've looked on here and some other websites, and I'm not really sure even if I re-wrote the JS code that it would behave as I need it to.
But thanks for the input & suggestions. If anyone can think of another alternative solution to this, I'm all ears.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)