Hello I had a question and hoping somebody could clarify. When you make a page request using an XMLHttpRequest object, does it refresh and reflect changes in the page every couple minutes like a browser?
Browsers don't refresh and reflect changes unless something tells them to (either a script, meta-refresh tag or the user).
To answer your question, no - the XMLHttpRequest object does not periodically refresh itself with the latest version of whatever URL it last pointed at. Any such behaviour would be an absolute nightmare to work with since you would never know if or when your code might be half-way though processing the results of some operation and the object would go and change the data stored in it's response.
Never be afraid to share your dreams with the world.
There's nothing the world loves more than the taste of really sweet dreams. Webflo
Maybe he means if it cache the page request like the browser do. I don't know. But it's wise to use a timestamp in the URL when making HTTP Requests to be sure that the Request is fresh..
- Lowet
[gray]Why can't all browsers parse pages the same way? It should be the Web designer who decides how to display the content, not the browser![/gray]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.