Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Content Expiry

Status
Not open for further replies.

TheVillageIdiot27

Programmer
Nov 10, 2005
58
GB
Before I start I am not 100% sure that this is a JavaScript problem but it is my best guess.

I have an intranet web page (ASP), which creates an XML file on the server by interrogating a database and saving it with a name based on the users logon name.

This page then runs a JavaScript which loads this file into Microsoft’s XMLDOM in addition with various XSLT style sheets and everything is done client side from there without any problem.

Code:
				// Load XML
				var objxml = new ActiveXObject("Microsoft.XMLDOM")
				objxml.async = false
				<% response.write("objxml.load(""helpdesk/domobjects/helpdesk_" & strUser & ".xml"")") %>

				// Load Main XSL
				var objxsl = new ActiveXObject("Microsoft.XMLDOM")
				objxsl.async = false
				objxsl.load("helpdesk/domobjects/stylesheet.xsl")

				// Load Events XSL
				var objxslevents = new ActiveXObject("Microsoft.XMLDOM")
				objxslevents.async = false
				objxslevents.load("helpdesk/domobjects/stylesheet_events.xsl")

				// Transform
				document.write(objxml.transformNode(objxsl))

Except...

There are about two things I need the user to do which involve the user running ASP scripts which make changes to the database and other things, at which point the entire page needs a reload.

As the page reloads the ASP script recreates the XML file fine, and any change to the basic page is reflected. However I seem to have to bang the refresh button for about 30 seconds to get the XML object to refresh.

I have checked that all the content expiry headers are set to zero.

Thanks in advance.
 
This sounds like a browser issue. Make sure your browser is set to get a new page from the server "On every visit to the page." Obviously this is not currently happening. Probably it is set to browser default, which is a BAD idea.

If your not sure how to do this, reply & Ill explain.





Greg Norris
Software Developer & all around swell guy


__________________________________________________
Constructed from 100% recycled electrons.
 
At the moment the only thing I have is:

<META http-equiv="expires" content="0">

in the header section of the page, I have always assumed this would be enough to avoid this kind of problem, but I assume this doesn't apply to supporting pages?

Any help you can give I would gratfully appreciate.
 
Try using a refresh statement, either in your javascript or asp, depending on the structure of your program:

Here are some helpful links:




Gppd luck,




Greg Norris
Software Developer & all around swell guy


__________________________________________________
Constructed from 100% recycled electrons.
 
Thanks for these,

Afraid no luck though, have ended up fudging it so that each time the script loads the page it does so appending a session number onto the end of the file name and deleting previous entries. Seems really rubbish, but at least it works, but I would still love to know if there was a better way of doing it.
 
I wish I could see this myself, becuase I feel certain that there is a solution to your problem.

Can you send me something, a link or something? If I can't figure it out, I'm sure my boss can. He's been doing web dev since way back when the Web was brand new.





Greg Norris
Software Developer & all around swell guy


__________________________________________________
Constructed from 100% recycled electrons.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top