This is a discussion on Efficient page design question within the Windows Web Servers forums, part of the Web Server and Related Forums category; I am working on a project where I want to pass XML data to the browser. There are a few ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I am working on a project where I want to pass XML data to the
browser. There are a few ways to do this, and I'd like to understand the differences with respect to when the server sends the data. 1: <xml id="xmldata"> <data>blah blah blah</data> </xml> 2: (in javascript:) use XMLHTTPRequest 3: <xml id="xmldata" src="http://www.bogus.com/myxml.xml"> </xml> 4: <iframe name="xmldataFrame" src="http://www/bogus.com/myxml.xml> </iframe> All of the above methods work differently, or not at all, in different browsers (I'm currently trying to ensure cross-browser compatibility with IE, Mozilla and Opera). That's a different topic of discussion. What I'm wondering is how a server sends data. Clearly, in version 1, the XML data comes with the rest of the HTML, and just as clearly, version 2 comes only after the page is loaded. For the other two versions, I'd like to know if a web server would send both the HTML and the XML data in one data transmission. I'm trying to avoid round-trips to the server. Another factor is caching: if I use the same XML data in many pages, and the data is cached, version 1 might be least efficient, unless a server round-trip is necessary to determine that a cached item is current. Is this information documented online anywhere? Thanks for any enlightenment you can provide me... |