The optimal performance of an absorption refrigerator operating between four temperature levels with the losses of heat resistance and internal irreversibility is analyzed first by taking the total heat transfer area of heat exchangers as an objective function. The minimum total heat transfer area is described in terms of the rate of the entropy changes of four heat reservoirs, and the generally optimal relation among the cooling load, the coefficient of performance and total heat transfer area is achieved. Then, an ecological optimization criterion is proposed for the best mode of operation of the absorption refrigerator. We investigate the ecological optimization performance and derive the corresponding cooling load, coefficient of performance and entropy production rate at the maximum ecological criterion for the absorption refrigerator. A comparison of an absorption refrigerator performance under maximum ecological function and maximum cooling load conditions is presented. Effects of the cycle parameters on the ecological performance have been discussed.