Solution:
goog.net.XhrIo.send(url, undefined, undefined, undefined, {'Cache-Control': 'no-cache'})
You should use undefined
instead of optional parameter you want to skip, because this 100% simulates the default value for optional parameters in JavaScript.
Small example:
myfunc(param);
//is equivalent to
myfunc(param, undefined, undefined, undefined);
Strong recommendation: use JSON if you have a lot of parameters, and you can have optional parameters in the middle of the parameters list. Look how this is done in jQuery.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…