Reputation: 5039
I discovered an issue with Internet Explorer 9 and Internet Explorer 8 Comp (so far) with the jQuery plugin, jCryption. Calling the page the first time works fine in said IE version. Subsequent calls to the page result in only the handshake being called, while keypair generation is ignored. The problem is how these version of IE handle caching.
I looked at the source code of jCryption and here is the set of code which calls keypair generation:
/**
* Gets the data from the specified url, and converts it into a RSA keypair
* @param {string} url The URL to contact
* @param {string} data The JSON data
*/
$.getJSON(url, function(data) {
var keys = new jCryptionKeyPair(data.e, data.n, data.maxdigits);
if($.isFunction(callback)) {
callback.call(this, keys);
}
});
I changed it's request from GET to POST, which effectively disables caching of this request.
$.ajax({
url: url,
dataType: 'json',
type: "POST",
success: function(data) {
var keys = new jCryptionKeyPair(data.e, data.n, data.maxdigits);
if ($.isFunction(callback)) {
callback.call(this, keys);
}
}
});
The handshake code is similar, in that it also makes a jQuery Ajax POST request.
Upvotes: 1
Views: 432