Hi all, I am loadin the Jsp page in a particular frame with the help of 'open()' function as given below, open("nameofpage.jsp", "framewheretoload"); But my problem is: First time the browser loads the Jsp page properly with all the values fetched and displyed in a drop-down-list box. These values are fetched from database. But if I change these values from some other page and comes back to the previous one, the latest values are not displayed (jsp is not reloaded), and the old page is loaded again. This is I think due to the caching of the browser. But If I clear the cache of the browser and work again it works fine. Can anybody suggest me a way to code the jscript in such a way that everytime it reloads the JSP page and displays the updated data. Kindly send me your suggestions. Hope to get some help thanks in advance shikhar
This is a fairly well known problem, and the solution depends on which browser(s) you want to support. I do most of my testing with Netscape, for which I know you need to send a "pragma: no-cache" header to prevent the broswer caching the page. There is another way of doing it for IE, but I don't have that to hand. Search here and on the net in general and you should find the answer fairly quickly.
Hi Frank, Thanks very much for the reply. I am using IE as my browser. I tried to look on the net but couldn't find any help. Can you tell me whether I can use the same command you've given for IE also. If yes, can you give me the exact syntax and where to put this. Or can you suggest me some site which could be helpful. Thanks for you patience and help.. Shikhar
Hi , Thanks for the help. I've tried the following code in the HTML.: <HTML><HEAD> <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <META HTTP-EQUIV="Expires" CONTENT="-1"> </HEAD><BODY> </BODY> </HTML> But this is not helping me. The problem still persists. Actually let me explain the whole thing: I have a JSP page called whole.jsp, which has two frames as under: " <frame name="rulesMain" src="rulesmain.jsp marginwidth="0"> <frame name="ruleDetail" scrolling="auto" marginwidth="0"> " Now in first frame the source file is rulesmain.jsp. In rulesmain.jsp I call a Jscript function, which in turn loads the JSP file called rulesdetail.jsp in the second frame i.e. ruleDetail, by calling this function: " open("rulesdetail.jsp",RuleDeail"); " This function loads the JSP in second frame. Now everytime I loads whole.jsp, It first loads rulemain.jsp and then loads rulesdetail.jsp. Now my problem is that when I reloads the page whole.jsp, it reloads the rulesmain.jsp to the first frame with latest data but does not reloads rulesdetail.jsp. It just takes the page from the IE cache and displays the page with old data. Hope this makes sense and is clear. Pl help me and give me some helpful suggestion. Thanks in advance Shikhar
i dont know if this will help but in the apache conf filet here is an option for cacheing i dont know if it pertains to the browser or the web server ------------------ I wish there was a button on my monitor to turn up the intellegince. Theres a button called 'brightness' but it doesn't work
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
posted 19 years ago
Hi Brett, I think that might pertain to the web server, not the browser. thanks Shikhar
posted 19 years ago
Hi, Can somebody llok into the problem and help me. Thanks Shikhar
Hi all, I faced the same problem a few days back... Tried all the things that u specified... The problem is not related to caching, etc... It is related to the use of frames... Check what you have specified as the target for the frames... Also take a look at the question i had posted... and the solutions i had got... https://coderanch.com/t/283691/JSP/java/Forcebly-translate-recompiling-JSP