| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
I'm running up against the same problem and the 'If-Modified-Since' header doesn't help. Any other thoughts on things to try? The snippet of code is: function loadLinksysWirelessPage() { // pull IP and password var urlip; var urlpassword; if (window.widget) { urlip = widget.preferenceForKey(keyForRouterIP); urlpassword = widget.preferenceForKey(keyForRouterPassword); } var url = "" + urlpassword + "@" + urlip + urlend; debug(url); if (timerHtmlID == null) { htmlPageRequest = new XMLHttpRequest(); htmlPageRequest.setRequestHeader("Cache-Control", "no-cache"); htmlPageRequest.setRequestHeader('If-Modified-Since', 'Wed, 15 Nov 1995 00:00:00 GMT'); htmlPageRequest.> htmlPageRequest.overrideMimeType('text/xml'); htmlPageRequest.open("GET", url, true); htmlPageRequest.send(null); timerHtmlID = setInterval("htmlPageTimeout();", 2000); } This is pulling information from a Linksys router through it's web interface. It needs a password to access it, but no username. The url looks something like "http://:email@hidden.1.1/WL_ActiveTable.asp". The first time through, it works beautifully. After that, I get a: --> htmlPageRequest readyState: 4 --> htmlPageRequest status: undefined and the content hasn't changed, though the data on the page has changed. I've tried deleting the XMLHttpRequest object, setting it to null, deleting the responseText attribute (which comes back). I read that appending parameters in the form of "?id=" + (new Date).getTime(), with the server returning a 404 on that one. I wonder if flipping to a different web page and back would clear something enough to get new data? Any thoughts are welcome. Thanks, Danny
|
_______________________________________________ Do not post admin requests to the list. They will be ignored. Dashboard-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/dashboard-dev/email@hidden This email sent to email@hidden
| References: | |
| >XMLHttpRequest with password authentication? (From: Danny Rappleyea <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.