How to stop the Browser from caching my web pages

Hi There
Can anyone tell how to stop the browser from caching my jsp pages
I am using
<%response.setHeader("Cache-Control","no-cache");
response.setHeader("Pragma","no-cache");
response.setDateHeader ("Expires", 0);
%>
but this does not work anduser is able to go back to the previous page
which i dont want and i want the browser to display the message the page has expired
Help appreciated
Thanks
Mumtaz

response.setHeader("Cache-Control", "no-cache");
response.setHeader("Pragma", "no-cache");
response.setDateHeader("max-age", 0);
response.setDateHeader("Expires", 0);
I have cut paste the code from my jsp which is working. There is one additional line. I do not know if that is the cause but there is no harm in trying that out.
Srinivasan Ranganathan

Similar Messages

  • How to stop the Dialog from being dragged

    I was hoping that someone could tell me when calling a Dialog from Jframe, a how to stop the Dialog from being dragged
    while a dialog is showing.
    When it is visible I can still click and drag the Dialog
    I want to set it so you can not drag it until the dialog has be closed.

    If you don't have access to the parent frame, a "hack" that usually works:
    Frame frame = Frame.getFrames()[0];
    if (null != frame && frame instanceof JFrame){
    JFrame jf = (JFrame)frame;
    JDialog jd = new JDialog(jf, "title");
    ... code here ...
    As each JFrame (or Frame) is opened, its stored in the array of Frames that you can get. Same thing with Dialog.getDialogs(). Almost always, at least so far for me I've never had this problem, the [0] index is the main window opened, or the parent/top frame. I'd put the check in there to be safe and make sure its a JFrame and usually you'll only have the one JFrame.

  • How to stop  the users from changing the Decimal in SAP

    How  to stop  the users from changing User Profile

    Hai,
    It is not possible to restrict SU3 to display, because it has only S_TCODE has the authorization object.
    If you really want to restrict users from changing their profile you have to remove the SU3 access and give SU1 or SU2 which gives access only to Personnel details and Parameters.
    Hope this helps.
    Regards,
    Yoganand.V

  • How to stop the Calendar from editing your input?

    How to stop the Calendar from editing your input?

    I am constantly finding that Calendar Version 8.0 thinks it knows what I want to type but it incorrectly takes numbers and days and times out of my input and changes my appointments. I hate this new supposedly "smart" feature. Even when I edit my event correctly a second or third time it rewrites my input incorrectly again. I have to use my iPhone to override the annoying editing on my mac. I am ready to find a new calendar program unless Apple allows users to input what they want without their information being incorrectly edited.

  • How to stop the dock from showing all hidden images when hiding then showing applications

    How to stop the dock from showing all hidden images when hiding then showing applications

    It's not really something to snap a screen shot of. I believe it would need to be a video clip. For instance, when I am working on multiple images in Photoshop, I often need many images open at the same time, but I only have one image viewable and active. The hero image is active on screen while I hide the other images in the dock by hitting the yellow - button on the images. Then I "Hide" Photoshop to do something in the Finder. When I go back to Photoshop, every image that is hidden in the dock will pop open again in the active window, not just the image I was currently working on. I want these images to stay in the dock until I need them, no matter how many times I Hide the Show Photoshop.

  • HT2188 How to stop the battery from draining

    How to stop the battery from draining

    I tried everything to stop my battery from draining on my iPad 2 since I have downloaded IOS 7.... Without success. Very disappointed with IOS 7 so far. Apple please release a patch to stop the battery from draining. It is urgent. My iPad is now useless, it is always drained to 0% everytime I open my iPad!?!?!

  • How to stop the report from Web!

    hi,all!
    Now I can start a report from Web with schedule parameter!Can you tell me how to stop the report via the Web server?Or tell me with which patameter.Thank a lot.

    hello,
    there is a CGI/Servlet command called killjob which you pass the job-id of the job you want to kill.
    regards,
    the oracle reports team --pw                                                                                                                                                                                                                                                                                                           

  • Anyone know how to stop the slideshow from looping?

    Does anyone know which file to edit in order to stop the slideshow from looping? Where the code would be or, what code to add.
    I am not aware of a setting from within iweb itself.
    I assumed it was the slideshow.js file but I didn't find anything in there.
    Such as a loop "true"
    HELP

    That worked great.
    I assume what we are doing is copying and editing the
    .mac slideshow file,
    and then pointing to it's location in the folder. How
    Yes, that's exactly it.
    did you know what the code would be? I guess you must
    be very Java savy, because it definetly wasn't an
    obvious one.
    It took me two days to reverse engineered dot mac slideshow
    Is there a way to get the slideshow window to close
    after it's finished? What I get is a freeze frame on
    the last photo of the show.
    I know you gonna ask that yes, change the added line in slideshow.js to this:
    if (count == ((imgs.length) - 1)) { this.pause(); setTimeout("window.close()", 5000); }; // close window after 5 sec, change 5000 to whatever you like.

  • [SOLVED]How to stop the screen from shutting it self off?

    First of all, spare me the "search/man/wiki-first"-talk becouse I have already done that as far as my knowledge of the subject reach. If you think you seen a thread like this with a solution, please link to it without any retarded comments.
    Now to my question: How do I , from the commandline, stop the display from shutting it self off automatically after awhile?
    Last edited by whacath (2010-02-19 11:27:12)

    To disable DPMS and screen blanking:
    xset -dpms s off

  • How to stop the executable from starting when opened

    Hi Guys,
    I am building an exe with the application builder. I am not able to find a way to stop the exe from running when opened. I dont need the exe to run. I know I m missing a very basic step here but I m not able to do that.
    Could anyone explain me how to do this.
    Regards,
    Nitin

    Hello,
    This is Dominic L. from Applications Engineering at National Instruments. This was reported to R&D (CAR#41DAPUQU) and was fixed in LabVIEW 8.2.1. Here is a link to the current evaluation software download for LabVIEW:
    http://digital.ni.com/demo.nsf/websearch/14f9ce475127ade786256ac60070926c?opendocument
    This particular bug actually renders all the build options for source file settings unusable. While the other options can be set manually in the source VI properties, the start-up VI will always run when an executable is opened.
    Here are three different workarounds to this:
    Option 1 - Upgrade to 8.2.1. 
    Option 2 - Check "Enable debugging" and "Wait for debugger on launch" in the Advanced page of the build specification. One side effect is this will include the block diagrams of the VIs and extra code for debug tool support. Note that if you don't protect the source code (block diagram), it kind of defeats the purpose of creating an executable.
    Option 3 - Use a dummy startup VI to launch the desired startup VI.
    For the third workaround, the attached "Dummy Startup VI.vi" uses VI server to open the desired startup VI's front panel and then closes.  To use the Dummy Startup VI follow these steps:
    Add the Dummy Startup VI to the project.
    Open the Dummy Startup VI and change "Main VI.vi" to the VI you would like to open but not run in the project and save.
    In the source files page of the build, select the Dummy Startup VI as a startup VI and the VI you would like to open but not run as a support VI.
    Build and run.
    I hope this helps.
    Have a great evening!
    Best Regards,
    Dominic L.
    Attachments:
    Dummy Startup VI.vi ‏12 KB

  • How to prevent the browser from executing the old version of js file...

    Dear sirs,
    I have a JSP page that includes a javascript file as given below,
    <script type="text/javascript" src="../scripts/validation.js"></script>
    Some times modification is needed in this included script file. After the modification, when I load the JSP page in the browser,
    the old copy of the script file, which was not modified is getting executed. by the browser.
    I would like to know whether any options are availabe in javascript to prevent the browser from executing the old copy that has already downloaded to the temperary interner folder(from caching)and use the modified version available with the new response...
    Thank you,
    Sudheesh K S

    Dear sir,
    Thakyou very much for your comment.
    I tried this, By doing thisThe .html page of the response will be deleted. But the javascript file will not be removed. It will be remail there.
    This lead me to the idea to think about javascript. I heard that some commands are there in javascript like cache ="NO" but not sure. I searched in the net but no favourable result found...
    Thank you,
    Sudheesh....

  • How to stop the screen from coming on in my pocket on my Samsung GS4

    When I put my Samsung Galaxy S4 in my pocket or my wife puts hers in her purse the display keeps lighting up because the buttons are apparently getting pushed. This is running our batteries down when we aren't even using the phones. Is there a way to stop the screen from lighting?

    Make sure that you don't press the home button or power button when you put the phone away. You can reduce the screen time out time down to 15 seconds thereby reducing the battery usage to that short time period. Also make sure that your phone sleeve is not pressing against those two wake up buttons.

  • How to stop the volume from reverting to normal when plugging in headphones

    Hello! I usually put my volume on the first bar, and when I plug in my headphones, it reverts to half of the bars being full- blasting my ears. I always forget it too. Soo
    I was wondering if there was a way to stop the volume from changing when I plug in my headphones. Is it possible? It would be really really good

    I experience the same problem when i plug in my speakers, I think if you change the itunes volume slider and or dont pause the song then you wont experience the problem

  • How to close the browser from an Applet?

    Hi,
    I've written one applet, with 2 buttons (Continue & Exit). On click of Continue button, it will open another web page. On click of Exit button, the browser should be closed.
    I'm not able to close the browser from the applet.
    Can any body help me.
    Rgds
    Santosh

    In my experience, calling Javascript from applets is flaky at best. However, I have gotten it to work in some cases. The following code should get you started:
    netscape.javascript.JSObject win = netscape.javascript.JSObject.getWindow(applet);
    Now you can call different methods on the win object (look into Javascript documentation for details).
    It also depends on if you are using the Java Plug-in or the JVM built into the web browser. You probably need set MAYSCRIPT=TRUE in your HTML. Look into the Java Plug-in documentation for details...

  • How to stop the browser redirect me to Chinese version websites?

    For example, when I typed in nba.com, it goes to http://china.nba.com/index.html?gr=www. Similarly to bing.com.
    In addition, when I shop in any website, the currency shows in CNY other than USD.
    I'm using the newest version of Firefox (English version) downloaded from the official website. I run the browser in Windows 7 pro English version. The only personalized setup I made to the system is under the Region and Language, Language for non-Unicode programs is Chinese (simplified, PRC). While this didn't affect other browsers as well as previous version of Firefox. I removed this setup for a while but the Firefox still redirecting the websites to Chinese version.
    It really bothered me. I love Firefox. Please help!

    Are you located in China? If so, the websites determine your location based on your [https://en.wikipedia.org/wiki/IP_address IP address].
    There's no universal way to stop this.
    * There might be a special URL you can bookmark that always loads the US version of the site, e.g.
    ** https://www.bing.com/?mkt=en-US
    ** https://www.google.com/webhp?hl=en
    * You usually have to go into the site's preferences (if available), and set your language and locale preference there. This requires allowing cookies from the site in question to store the setting.
    ''zhuowang1980 wrote:''
    Language for non-Unicode programs is Chinese (simplified, PRC).
    Foreign non-Unicode programs might run correctly in the English US locale when launched through Microsoft Applocale.
    * [https://www.microsoft.com/en-us/download/details.aspx?id=2043 Microsoft Applocale Utility | Microsoft Download Center]
    * [http://www.emreakkas.com/windows-tips/how-to-install-applocale-on-windows-7 How to install Applocale in Windows Vista and later | Emre Akkas]
    * [http://opcode0x90.wordpress.com/2008/01/09/patch-for-applocale/ Patch for AppLocale | Opcode0x90′s Blog] (gets rid of the pointless nag screen)

Maybe you are looking for

  • Is there a way to create an endless loop of one playlist?

    I have a playlist where I would like to create an endless loop. Is there a way to accomplish this task? Software Version 1.2. Someplace I read about going into Settings and down to "repeat" and selecting "all." The settings on my iPod Nano does not s

  • Regarding CRM Reports

    Dear Folks, I have this kind of scenario: In one report the data must come in this fashion: If customer budget is selected then corresponding category must be displayed. For ex: If customer category revenue is selected then in category column it must

  • FM to calculate discount based on Payment Terms (for Accounting document)

    Hi- I am refering to Cash discount calculated on an accounting document. Discount is calculated based on Payment Terms. [ Baseline date: date from which discount period starts; Cash discount terms ; Cash discount percentage rates.] Is there a standar

  • EDI on SAP B1 9.0

    Hello All, Do any of you have succeed in setting EDI? I have followed this link http://help.sap.com/saphelp_sbo900/helpdata/en/86/f8df0a738a4d088e33d39820c6206c/content.htm?frameset=/en/45/06da27d8696c30e10000000a114a6b/frameset.htm about Activating

  • Replacement of FM u201CPOC_DB_UPDATE_DELETE_DOCIDu201D in ECC 6.0

    Hi, In the 4.7 It was been used the function module u201CPOC_DB_UPDATE_DELETE_DOCIDu201D but the same function module is not existing in ECC 6.0. Could anyone please let me know the replacement of the above function module in ECC6.0. Thanks in advanc