Solved

Need Caching in IE 6.0

Posted on 2004-04-12
7
136 Views
Last Modified: 2010-04-01
Hi
   One of the screens in our application requires caching. i.e. User will enter data in input screen & click "Create" button. The data will be submitted to the server and re-displayed in the same screen with the previously entered (We havent done anything programmatically to re-display the data).  We've coded for no-caching in an include file and included it in all the pages. Because of the above requirement, the above jsp overrides no-caching by using the following

      response.setHeader("Cache-Control","store");
      response.setHeader("Pragma","cache");
      response.setDateHeader("Expires", 20160);

This works fine. The data is re-displayed after the user clicks create.  

The screen contains a button that will invoke another pop-up screen that will fill one of the fields in the base screen. Once the pop-up screen is invoked and closed, the caching technique doesn't work. i.e. the data is not re-displayed after clicking "Create" button. This problem occurs even if a blank page is invoked in the pop up window.

Is there any possible solution to overcome this?

Note:-  In Mozilla, the data is automatically cached even without the above three lines. i.e. it re-displays the data after clicking "Create" . It works fine even if the popup window is invoked. Hence, the user community wants the same behavior in IE too!!!!

0
Comment
Question by:athuranand
7 Comments
 
LVL 49

Expert Comment

by:Ryan Chong
ID: 10806543
Require caching? Why dont just simply remove those 3 lines above?..
0
 

Author Comment

by:athuranand
ID: 10808281
If the above three line are removed, then caching wont happen.
0
 
LVL 13

Expert Comment

by:copyPasteGhost
ID: 10818515
I would use a java bean

load all the values you want into a java bean and then load them from the bean on to your page.. you can keep the same variables for the whole session..

when using beans 3 things to keep in mind.

1)   you need a package.
      add this statement to all your .java files.
      package myPac;

2)   you must declare this at the top of your .jsp page.
      <jsp:useBean id = "tracking" scope = "session" class = "myPac.myClass" />

3)   You must be using this directory structure

-jspfiles
-WEB-INF
          -classes
              -myPac
                   -myClass.class

I can explain this futhur if you are not familiar with java beans..
let me know and I'll get back to you as soon as possible.
Cheers
Ghost
0
 

Author Comment

by:athuranand
ID: 10861690
Hi Ghost
   Thanks for your reply. I'm faimiliar with java beans and also reloading technique using beans. I'm just trying to satisfy some requirements on already existing code. Moreover this page is being reused and dynamically generated depending upon the type of entity. So, using beans at this stage doesnt work. But thanks for your reply.
0
 
LVL 1

Accepted Solution

by:
KartikShah earned 500 total points
ID: 10919263
Normally, you are on the mercy of the browser, what data it displays in the form fields. i.e. the browser, can either display the last values posted, or the default values associated to each field i.e. the value present in the value attribute, which in your care is empty.

If you want to provide a consistent output, irrespective of the browser's decision, I would suggest you, you can load the page again, with the submitted values as the default values.

This will give confidence, that irrespective of the browser being used, the functionality will be the same. :)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
project group option in netbeans equivalent term in eclipse 1 47
iterator example remove 8 74
own marker interface 1 50
how to hide hide popup page refresh second time? 10 110
Note: This is the second blog post in a series on email clearinghouses (https://www.xmatters.com/alert-management/blog-email-has-failed-us?utm_campaign=70138000000ydLoAAI&utm_source=exex&utm_medium=article&utm_content=blog-post).   Every month t…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now