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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML Content Expiry

Status
Not open for further replies.

TheVillageIdiot27

Programmer
Nov 10, 2005
58
GB
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))
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, and am sure this is a problem with the expiry of the supporting XML page rather than the ASP page itself.

Thanks In Advance.
 
This would better be all scripted server-side, then you'll have better control of the timing on db updating, file saving... etc?
 
Afraid not, 95% of the activity is done client side. I have just managaged to fudge 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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top