Synchronous v. Asynchronous » Yahoo! User Interface Blog (YUIBlog)
may 2010 by kostas
Referring to the synchronous mode of operation: "Because the JavaScript engine is blocked until the request completes, the browser will be frozen. The user cannot cancel the request, cannot click away, cannot go to another tab. This is extremely bad behavior. Fortunately, XMLHttpRequest provides an option for asynchronous operation. When you set the asyncFlag flag to true, the JavaScript engine does not block. Instead the request returns immediately, with a potential action that will be triggered later when the result on the request is known."
ajax
optimize
may 2010 by kostas
Two Simple Rules for HTTP Caching - HttpWatch Blog
may 2010 by kostas
"In practice, you only need two settings to optimize caching:
1. Don’t cache HTML
2. Cache everything else forever
So here’s the icing on the cake; you don’t actually need to change the filename, just the URL. A simple way to do this is to append a query string parameter onto the end of the existing URL when the resource has changed."
apache
optimize
1. Don’t cache HTML
2. Cache everything else forever
So here’s the icing on the cake; you don’t actually need to change the filename, just the URL. A simple way to do this is to append a query string parameter onto the end of the existing URL when the resource has changed."
may 2010 by kostas
Speed Tips: Use Multiple SubDomains
may 2010 by kostas
From a comment on that page: "The more connections you force the client to open, the more data the browser must send upstream in the HTTP request headers. This is especially true if you have a gigantic site cookie collection on the domain you’re serving assets from, then this exacerbates the problem because with each connection, a client must upload the whole cookie every time it makes a request. Do you really want a browser to send a 4K cookie upstream at 128kbps in order to download a 53 byte clear.gif at 768kbps? It is always best if possible to serve assets (js, css, images) from a separate hostname/subdomain so that your main site’s cookies are not transmitted upstream with each and every request (static content rarely, if ever, needs to access a cookie)."
apache
optimize
may 2010 by kostas
Speed Tips: Add Future Expires Headers
may 2010 by kostas
"A first-time visitor to your page will make several HTTP requests to download all your sites files, but using the Expires header you make those files cacheable. This avoids unnecessary HTTP requests on subsequent page views. Expires headers should be used on all components including scripts, stylesheets, and Flash components."
apache
optimize
may 2010 by kostas
Speed Tips: Turn On Compression
may 2010 by kostas
"Apache 2 uses mod_deflate to quickly and easily compress your static .css and .js files before you send them to a client."
apache
optimize
may 2010 by kostas
Speed Tips: Remove Last-Modified Header
may 2010 by kostas
"If you remove the Last-Modified and ETag header, you will totally eliminate If-Modified-Since and If-None-Match requests and their 304 Not Modified Responses, so a file will stay cached without checking for updates until the Expires header indicates new content is available!"
apache
optimize
may 2010 by kostas
Speed Tips: Turn Off ETags
may 2010 by kostas
"By removing the ETag header, you disable caches and browsers from being able to validate files, so they are forced to rely on your Cache-Control and Expires header. Basically you can remove If-Modified-Since and If-None-Match requests and their 304 Not Modified Responses."
apache
optimize
may 2010 by kostas
YUI Compressor
may 2010 by kostas
"The YUI Compressor is written in Java (requires Java >= 1.4) and relies on Rhino to tokenize the source JavaScript file."
tools
optimize
javascript
css
may 2010 by kostas