Caching problem with dynamically modified menus

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Nozzer
Beginner
Beginner
Posts: 5
Joined: Wed Oct 13, 2004 4:39 pm

Caching problem with dynamically modified menus

Post by Nozzer »

Hi
Not a problem with Milonic I realise, but thought this might be a good place to look for advice. I've got a menu file AdminMenu.js which is maintained by an ASP.NET program. When the program updates the file, the changes are not reflected in the displayed menu. If i turn the internet options to 'check for newer versions of stored pages - every visit to the page' then it does work OK, so I guess this shows it is a prob with caching.
I've tried
<HEAD>
<META Http-Equiv="Cache-Control" Content="no-cache">
<META Http-Equiv="Pragma" Content="no-cache">
<META Http-Equiv="Expires" Content="0">

Also tried putting the following at top of aspx page...
<% Dim pStr As String = "private, no-cache, must-revalidate"
Response.ExpiresAbsolute = "Mon, 22 Jul 0002 11:12:01 GMT"
Response.AddHeader ("Pragma","no-cache")
Response.AddHeader ("cache-control", pStr)
Response.Expires = -1000 %>

All to no avail. Anybody else have this problem, know how to sort it out?
I'm using IE6.

Thanks
Nozzer
Nozzer
Beginner
Beginner
Posts: 5
Joined: Wed Oct 13, 2004 4:39 pm

Post by Nozzer »

I sorted this out by using an ASP statement to include the menu.js file - i.e. <!--#include file="Menu\AdminMenu.js"--> instead of the javascript way src="Menu\AdminMenu.js"

see
http://www.experts-exchange.com/Web/Web ... 64765.html
Post Reply