Call (877) SITE-OPT (748-3678)

Code: Assume default values

Chapter 8 - Ajax Optimization

Consider the use in Ajax of the open( ) method. You must specify the method and URI, but you do not have to pass in the final Boolean value of true to achieve the default asynchronous nature of an Ajax request. So, this:

xhr.open("GET","sayhello.php",true);

becomes this:

xhr.open("GET","sayhello.php");

And thus, we kiss five more bytes goodbye.

Copyright © 2002-2017 Website Optimization, LLC. All Rights Reserved - Free website speed test - Privacy Policy
Last modified: February 19, 2009.

Follow us on: Twitter, Google+, Facebook, Linked In