Click to See Complete Forum and Search --> : JS file and Cache problem


jthorb
08-26-2003, 03:26 PM
I am using a treemenu and I have a JS file which builds the menu. I have a few XML files which are used by a java class to create this JS file. The treemenu is also used through the same page. My problem is when I load the page for the first time, it builds the JS file and puts it in the cache. The next time I view the page (when I am trying to view a new menu) it builds a new JS but loads the one in the cache thereby showing the wrong menu. When I click refresh, the correct menu is then displayed. The treemenu is also displayed in a iFrame.

Here is what i mean:

MENU PAGE---->click Menu1------>FRAMES.jsp(with SIDE.jsp which includes iframe for MENUDISPLAY.jsp which builds TREE)----->click Return to MENU PAGE------->click Menu2---->FRAMES.jsp(with same menu loaded)---->click "REFRESH"---->new Menu is loaded.

SIDE.jsp
<TABLE>
<TR>
<TD>Menu Selection</TD>
</TR>
</TABLE>
<iframe ID="treemenu" src="/puridiom/xchange/admin/tree/MENUDISPLAY.jsp" height=450 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0></iframe>

FRAMES.jsp
<FRAMESET ROWS="74,*" BORDERCOLOR="#E9E9E9" >
<FRAME SRC="admin_menu_frame.jsp" NAME="menu">
<FRAMESET COLS="322,*%">
<FRAME SRC="SIDE.jsp" NAME="sidebar" >
<FRAMESRC="admin_body.jsp" NAME="body" >
</FRAMESET>
</FRAMESET>

Any help would be greatly appreciated!!!

jthorb
08-27-2003, 07:19 AM
-bump-
Anyone have and ideas?

Khalid Ali
08-27-2003, 08:33 AM
best is if you can provide a link to a live link page for better understanding,second
did you try to use meta-tags for ="no-cache"?

jthorb
08-27-2003, 09:12 AM
Can't provide a link because its not online yet. Using Tomcat. And yes I've tried the meta tags everywhere! And they work; nothing gets cached in those pages except for the JS files being used and pictures(which i dont mind). Just cant have the JS files being cached.