///////////////////////////////////////////
IntelliBitz Technologies
http://training.intellibitz.com
044 22475106
trai...@intellibitz.com
http://groups.google.com/group/etoe
http://sted.sourceforge.net
http://www.slideshare.net/intellibitz
///////////////////////////////////////////
i used your wrapper to handle many things in my app, it's a great job
but i have a problem :)
The most important thing you did is for me that you allowed us to use
external files in workers (your getLib() method retrieve the code of
such files)
but you are using xmlHttpRequest to do it so, and currently i'am
having a problem with this, when my app is "disconnected" (i mean
datas,scripts are in cache) and my webserver is stopped, the worker2
try to retrieve datas through the xmlHttpRequest object and it looks
like with this method the localServer can't intercept the request and
serve local cached files so remote server doesn't answer and the
worker2 crash.
If i'am wrong or anything else please notify me. If you have solutions
i'll take :p
Thank you for the job
See you
Clément
- a
This file is is the urls list of the files to capture, (same url) and
in the storage directory of the local server i can see "
json[14515].js "
So i guess the file is captured, and the url is the same.
Anybody experiencing the same type of things overthere?
Clément
On 5 juil, 11:09, "Aaron Boodman" <a...@google.com> wrote:
> LocalServer should be able to intercept requests from XMLHttpRequest.
> Are you sure that the URLs you are requesting match exactly what has
> been captured?
>
> - a
>
in your xhr.js file:
doRequest method:
Only you can tell me but this piece of code will add the
current timestamp to url as parameter. And since nothing should be in
opt_params (as long as i know) the url should be : urlVar + ?
r=timestamp
// To prevent browsers from caching xhr responses
opt_params['r'] = new Date().getTime();
url += "?";
for (var n in opt_params) {
url += n + "=" + opt_params[n];
}
But when i print the url var in the console im seeing 2 parameters, r
(what is the timestamp) and " toJSONString " when contains code.
Maybe it can trouble the localServer when XmlHttpRequest tryes to
access to this sort of file?
Thank you by advance
Clément
but why the file can't be find when adding parameters.... if anybody
knows ;)
Thank you
Clément
On 7/5/07, bribus <bribu...@hotmail.com> wrote:
> but why the file can't be find when adding parameters.... if anybody
> knows ;)
It can. See the "ignoreQuery" property, here:
http://code.google.com/apis/gears/api_localserver.html#manifest_file
But again, the best thing is probably to remove that bit of code from
xhr.js. Good find!
- a
Thanks for the "ignoreQuery" hint, i'll look it this morning.
Have a good day ;)
Clément
On 5 juil, 17:19, "Aaron Boodman" <a...@google.com> wrote:
> Ah yes, I borrowed that xhr.js from Gearpad, where it is used
> transmitting application data and caching would be very bad. The
> timestamp is there to ensure that it doesn't happen. The best thing I
> believe for this case would be to remove it.
>
For those who, like me, use YUI :
Here is a hack to replace the doRequest function from the xhr.js file
using YUI :
function doRequest(method, url, postData, callbackFct) {
var successFunc = function(o) { callbackFct(o.status, o.statusText,
o.responseText); };
var xhr = YAHOO.util.Connect.asyncRequest(method, url, { success:
successFunc}, postData);
return function() { YAHOO.util.Connect.abort(xhr); };
};
Don't forget to include : (or from your server...)
<script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/
build/yahoo/yahoo-min.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/
build/connection/connection-min.js"></script>