Solved

Need Caching in IE 6.0

Posted on 2004-04-12
7
135 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
For cloud, the “train has left the station” and in the Microsoft ERP & CRM world, that means the next generation of enterprise software from Microsoft is here: Dynamics 365 is Microsoft’s new integrated business solution that unifies CRM and ERP fun…
This video discusses moving either the default database or any database to a new volume.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

758 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

21 Experts available now in Live!

Get 1:1 Help Now