Search

6/05/2009

Optimize browser rendering

Optimize browser rendering
Web Performance Best Practices
Using Page Speed

isServingFromCache
http://page-speed.googlecode.com/svn/trunk/src/js/activity/request-observer.js



/**
* @param {nsIRequest} request the request to get the URL for.
* @return {boolean} whether the response is being served from cache.
* @private
*/
activity.RequestObserver.isServingFromCache_ = function(request) {
var cachingChannel =
activity.xpcom.QI(request, activity.xpcom.CI('nsICachingChannel'));
return request.isPending() && cachingChannel.isFromCache();
};


http://page-speed.googlecode.com/svn/trunk/src/js/closure/base.js

goog.inherits = function(childCtor, parentCtor) {
/** @constructor */
function tempCtor() {};
tempCtor.prototype = parentCtor.prototype;
childCtor.superClass_ = parentCtor.prototype;
childCtor.prototype = new tempCtor();
childCtor.prototype.constructor = childCtor;
};

沒有留言: