Reload previous page on back button - using cache control

Hi,
In my application I am using cache control to avoid the pages to be cached. But the requirement is changed and now the previous page can be re-loaded on hittinh browser's back button even after the 10 mins. i.e if user hits the back button with in 10 mins he should be allowed to see the pre-loaded contents on the previous page. After 10 mins the browser should display the page refresh warning.
a) Old code to preventing caching:
response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
response.setHeader("Pragma","no-cache"); //HTTP 1.0     
response.setDateHeader ("Expires", -1); //prevents caching at the proxy server
b) I am trying with the code ha changes as to get the previous page with in 10 minutes time:
response.setHeader("Cache-Control","no-cache, max-age=600"); //HTTP 1.1
response.setHeader("Pragma","no-cache"); //HTTP 1.0     
The above code changes are not working. If uses "no-cache" with max-arg=600 it behaves like the code in section a).
If I uses response.setHeader("Cache-Control","max-age=600"); then even after 30 mins it load the previous page with preloaded contents.
Any help is appreciated.

I tried it lots of time by refreshing the browser's cache. I am using IE 6.0. I tested it through FireFox to get the header details. when I submit the request it displays the headers request
same as I set in the code. But when I hit the back button (after the max age time passed) still it gets the value from cache and no header values are displayed.

Similar Messages

  • Safari reloading previous page after pressing the back button

    Hey guys, here my question regarding Safari...
    Why is it that every time I do the two finger swipe on the trackpad to go back to the previous page I was viewing on the web, freaking Safari takes me back to that page instantly but then automatically reloads the page. WHY?!?!
    I don't have this issue while using Firefox. I swipe to go back to the previous page and it's instantly available for me to continue browzing / scrolling, etc.
    Another thing I noticed in Safari is that if I'm half way down a page and click on something, which takes me to that page but then I swipe to go back, it doesn't take me back to where I was on the page (say, half way down, for example) it take me up towards the top (not all the way at the top, mind you, just up higher, NOT WHERE I WAS WHEN I LEFT THE PAGE) Why does it do this?!?! You'd think that Apple would have designed Safari to be the next best thing since sliced bread and that it would work instantly and flawlessly. I'd imagine that Firefox and other browzers would be the ones taking forever to load but it's freakin Safari that is doing this, I don't get it.
    For the record, Firefox functions flawlessly. Instantly shows the page I was at when I press the back button or swipe back and it puts me BACK IN THE SAME SPOT THAT I WAS AT BEFORE I LEFT THE PAGE!!!!
    I use both browzers as I need two (use both for different things and have different bookmarks saved, etc) but I'm starting to HATE Safari simply for this one issue I'm having. It makes surfing the web take 2x as long as I not only have to wait for the page to RELOAD after pressing the back button, I also have to scroll back down to where I was before I left the page, which takes TIME!
    Someone please explain this to me. I looked at other posts regarding this issue but there is no clear solution to the problem.
    HELP.

    I think Apple should give the end user the choice whether to autoload the webpage when you press the back button or not. It would be a simple fix for this issue that it seems a lot of people are suffering with.
    I WANT to use the default web browser that my Macbook Pro came with (Safari) and don't really want to use the alternatives (Firefox, Chrome, etc) but surfing the web is a slow, time consuming process with this auto reload "feature".
    Apple, Please fix this ASAP!
    This is my first Apple laptop (was a long time Sony Vaio / Windows user) and I expected good things from my Mac, after hearing / reading all the reviews but this Safari issue is a MAJOR turn off for me. It needs to be address ASAP.

  • How can we prevent back button  using java script

    how can we prevent back button using java script

    Would be quicker for you to google for javaScript
    javascript:window.history.forward(-1);

  • I have just updated to 10.7.3 and safari always reloads previous pages I have been on every time on open it, my home page is set to google yet it always reloads from the history, how do I stop this

    I have just updated to 10.7.3 and safari always reloads previous pages I have been on every time on open it, my home page is set to google yet it always reloads from the history, how do I stop this

    There is a setting in the System Preferences for this as well that may be causing it. Go to System Preferences>General>Restore windows when quitting and reopening apps - at the bottom of the window under Number of Recent items. Remove the checkmark from that setting.
    Also - if you close all of your windows when you are done with Safari - it should open to your home page.

  • How to go to previous page in task flow using 'BACK' button in the browser?

    Hi...
    I have created system using ADF application that can detect 'BACK' button in the browser(e.g. firefox and google chrome).Everytime i click the 'BACK' button in the browser,it will prompt out message that ask user whether want to 'stay in the current page' or 'leave the page'. Once i click 'leave the page' it will take me to the login page.
    Is there any possibility for go back to previous page in task flow when user click on browser's back button? By the way, the task flow is in the page fragment.
    can anyone tell me how to do it?Need this step urgently..
    Thanks in advance.
    Edited by: 942376 on Jun 22, 2012 11:03 PM
    Edited by: 942376 on Jun 22, 2012 11:07 PM

    Can you send that code to have a look ? Share it on some site

  • Aviod page reload when user hits back button

    Hi
    I got 2 coldfusion pages A and B. When i click a link from
    page A it goes to page B. When i click the back button of the
    browser from page B the page A refreshes and shows. I dont want the
    page A to reload when the user hits the back button of the browser
    (so that all data remains as it was) from page B.
    is there any method to cache the page and show? Or are there
    any other methods? Pls help. I am running this project in Model
    Glue architecture (i dont know whether that makes any difference)

    Normal behaviour is that going back does not cause a page to
    reload. You might be doing something to make that happen. If you
    can figure out what it is, then you can stop doing it.

  • When navigating off home page(s), back button unavailable for use

    When I start up Firefox, I have 5 home pages. Once I navigate off the homepage to a page inside the sight, the homepage isn't available on the back button. When I first started using Firefox, I didn't have this problem, it has started with recent updates and has continued onto V4.0. I have loaded more than once, and this doesn't correct the problem

    Problem has been solved, I forgot to add a Parameter in request on the basis of which it performs the relevant action!
    Thanks for ur reply!

  • Stop Firefox reloading webpages when hitting back button

    Is there any way to make hitting the back button not reload pages? It's become a bit of annoyance to me within the past few days because it sorta messed with my flow.
    For example, let's say I'm looking at a phpBB forum. There's a unread posts button next to each topic. I click on the one next to a topic, this topic has 3 pages. The last post I read was halfway down the first page, it takes me to it (and adds "&view=unread#unread" to the URL). I finish reading the page, and move on to page 2. Partway down page two, I decide to go back to page 1 to re-read something that got quoted, and click the back button. But because of what seems like a recent change, Firefox attempts to reload the page instead of its old functionality... and thanks to the unread bit at the end of the URL, phpBB serves up page *3*. Now instead of going back, I've gone forward.

    This is irritating. This should not be necessary. In every previous version, clicking the back arrow re-displays the page from cache; clicking the reload button reloads the page.
    The back button has essentially become a reload button. It's just wrong. and it fouls up my work-flow. Also,
    browser.cache.check_doc_frequency user set integer 2
    did nothing to alleviate the issue.

  • How to set window.status when returning to a page with back button/list?

    It is easy enough to set window.status to application-oriented information when loading a page: do it in a function which is the onload handler for the page's body element. But, when returning to this window from another window with the second window's back button, or selecting the first window from the second window's back list, window.status gets set to browser-oriented information, usually the string "Done". Is there any means by which I can set window.status to application-oriented information when returning to the window via another window's back button/list? What would be really great is if there is an event handler like this:
    window.onreturnviaback = onreturn_via_backhandler;
    Any ideas?

    How about:
    - (void)viewWillAppear:(BOOL)animated
    I use that a lot.

  • How can I "expire" a web page (prevent BACK button access)

    How can I "expire" a web page ?
    I know some sites will display the following message if we click on the
    BACK button in your browser.
    Warning: Page has Expired The page you requested was created using
    information you submitted in a form. This page is no longer available. As a
    security precaution, Internet Explorer does not automatically resubmit your
    information for you.
    To resubmit your information and view this Web page, click the Refresh
    button.
    How do I implement this feature??

    U want to disable back button click
    if yes i think
    javascript:window.history.forward(1);

  • When downloading video to Facebook I get message "Firefox is preventing you from reloading this page" and allow button doesn't do any good.

    when I try to download a personal video to Facebook I get the message " Firefox prevented this page from automatically reloading". I click the allow button which lets it start downloading but it only stays on 3-5 seconds then gives me the message all over again. At this rate it would take an hour to download a one minute video. I also get this message in other programs and I don't have a clue how to stop it. Help me please!!!

    Website servers can redirect more than once, so you may not see anything happen and may need to click Allow more than once.
    See:
    * Firefox/Tools > Options > Advanced > General : Accessibility : [ ] "Warn me when web sites try to redirect or reload the page"
    The setting in "Tools > Options > Advanced > General" is meant as an accessibility feature, as you can see by the label of that section, so that people with disabilities or people who use screen readers do not get confused and is not meant as a safety protection to stop redirecting.
    See also:
    * http://kb.mozillazine.org/accessibility.blockautorefresh
    * https://support.mozilla.com/kb/Options+window+-+Advanced+panel#General_tab

  • How to make a back button using AS3

    I'm trying to do my first project using ActionScript in CS4. I need to make a back button that will take the user back to the last "slide" they were on.
    I went through the effort of creating a back button that I only realized didn't work after I was finished. I had it set up to just go to the previous slide and totally ignored the fact that there are several branching scenarios.

    I'm more or less having to teach myself at this point. Where should I go to learn about using an array?

  • JDeveloper - How to create a "back button" using JSF

    As simple as it sounds, I'm having trouble creating a basic back button on my JSF page. I'm using a af:goButton with the Onclick attribute stating history.back(). I've also tried history.go(-1) to no avail.... is there a trick to this?
    Thanks,
    Richard

    If you are looking for a more advanced case as describe, you will need to reference the last navigation outcome in a managed bean so that you can execute it when the back button is clicked.
    --Ric                                                                                                                                                                                                                                                                                                                                                                                                               

  • The url does not change when navigating to a new site or page. Back button is also inactive.

    I launch firefox 3.6.15 and it displays google main page. I perform a google search, get search results, click on a site link, and that page is displayed. All good. Here is the problem I am experiencing. The url for the site, however, is not displayed. Firefox still displays google.com and not the url for the page I am on. Additionally, the back button is inactive. So, I can never navigate back to the previous page. If I type in a url the same thing will happen. Forefox will display the typed in url and not urls for the pages I navigate to and the back button is inactive. Very frustrating.

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • Safari 4.0.4 will suddenly reload previous page while I'm reading new page

    I'll be happily reading down a column of text on a webpage and suddenly the browser will load the previous page as if I'd hit the back button.
    Any ideas?

    I am having the same problem with my wireless mouse! It has been happening for months, since I bought my iMac in November. The mouse was, obviously, included with my purchase. I keep forgetting to complain about the problem, until today when this odd occurrence happened for the 500th time.
    Sometimes, not always, a page I am reading will suddenly jump back a page when I reach for the mouse to slide it. I have not clicked anything, nor have I touched anything on the keyboard. It is random, and when it happens as I am composing text it is incredibly maddening! How do I make this stop? I have checked my setting and all are compatible.

Maybe you are looking for