Showing posts with label javascript. Show all posts
Showing posts with label javascript. Show all posts

Tuesday, April 19, 2011

Ajax long connect using server heart beat to check client connect if it is closed

Using a trick HTTP response header

HTTP/1.1 200 OK
Server: xxx
Beat: Waiting.................................... // trick
Connection:Close
Content-length:255
Content-type:text/xml
Date:Wed Apr 20 12:01:17 EST 2011
Expires:Sun, 24 Apr 1981 01:29:32 GMT

Void Google Chrome pointer spinning for long Ajax connection

Put the request in a timer, or link, never directly put in page onload event

function onload() {
setTimeout(function() { // start ajax long connection in another thread to avoid google Chrome pointer spinning
doLongAjaxCallLoop ();
}, 3000);
}



Wednesday, February 23, 2011

google data and blogger api

http://code.google.com/apis/gdata/docs/2.0/reference.html#Queries
http://code.google.com/apis/blogger/docs/1.0/developers_guide_js.html

http://itcoding.blogspot.com/feeds/posts/default?alt=json-in-script&category=mobile

Thursday, January 20, 2011

Stanford Javascript Crypto Library

SJCL is secure. It uses the industry-standard AES algorithm at 128, 192 or 256 bits; the SHA256 hash function; the HMAC authentication code; the PBKDF2 password strengthener; and the CCM and OCB authenticated-encryption modes.

http://crypto.stanford.edu/sjcl/
https://github.com/bitwiseshiftleft/sjcl/tree/master/browserTest
http://bitwiseshiftleft.github.com/sjcl/demo/