Cooling of a spray container This question came up when I recently answered this question Why are compressed air tanks cold? and I found this question Why does the gas get cold when I spray it? which seemed to be related, but the given answers do not really satisfy me. Also this question Why does deodorant always feel cold? is about the cooling of a deodorant spray and doesn't address the cooling of the container. A web search gave conflicting, mostly not scientifically well explained answers. 
In my opinion, there are three possible cooling effects:
(1) The adiabatic expansion of the gas involves work against the external pressure thus cooling the gas. This should already work for an ideal gas.
(2) The adiabatic expansion of the gas leads to a cooling due to the Joule-Thompson effect because the gas is not an ideal gas. This is due to a change of kinetic to potential energy of the molecules.
(3) The cooling of the container is due to evaporation cooling of the liquified gas inside the container.
ad (1) The problem with answer (1) is that the adiabatic expansion occurs outside the container against the air pressure. Thus the cooling should only occur for the outside gas not for the gas in the container.
ad (2) This problem should not occur  for answer (2) because the JT cooling effect already takes place inside the container upon pressure reduction. Also the cooling outside the container should occur.
ad (3) The gas is partially liquified inside the container due to the high pressure (e.g. butane) and the cooling of the container is caused by the evaporation heat of the liquid.
In the case of the aerosol spray I am now inclined to think that my answer (3) is the dominant effect in the container cooling. This does, however, not conform with the top rated answer (work due to adiabatic expansion of gas) of the mentioned identical question. 
Am I right with my suspicion that a cooling by adiabatic expansion of an ideal gas cools the gas outside but not inside the container? 
Is the container indeed cooled mainly by the liquid evaporation heat effect? Or is the Joule Thompson effect more important?      
 A: The adiabatic expansion cooling takes place inside the container.  The gas remaining within the container at any time has done work to expand against the gas that it has previously expelled from the container.  This expansion has occurred at the pressure within the container, not the external pressure.  So the gas remaining in the container has experienced an adiabatic reversible expansion.
Just picture an imaginary membrane at time t1 surrounding that fraction of the mass of gas that will eventually fill the container at a later time t2.  The gas outside this membrane is the portion of the gas that is pushed out of the container between times t1 and t2 by the gas within the membrane.  So the gas inside the membrane does adiabatic (essentially reversible) expansion work to expel the gas outside the membrane from the container.
For a reference on all this, see Fundamentals of Engineering Thermodynamics, by Moran et al, Chapter 6, Example 6.10 Considering Air Leaking from a Tank
A: Your option 3 is correct - the cooling is evaporative.
For some background see:


*

*Why does deodorant always feel cold?

*Pressure in deodorant can
A typical aerosol spray can looks something like this:

(image from the Aerosols Wiki - yes, that really does exist :-)
When you use the spray a small amount of the liquid is expelled. The liquid evaporates as it passes through the nozzle and this creates the spray. The evaporation at the nozzle is why the spray is cold.
As for the can, there will be some degree of cooling due to expansion of the gas, but this will be negligible for a couple of reasons. Firstly the volume of the liquid decreases by a relatively small amount, because a small amount of liquid creates a large volume of spray. This means the gas above the can increases in volume only a small amount so the adiabatic cooling is small. Secondly the specific heat of the gas is small compared to the can and the liquid, so the gas is quickly reheated by its surroundings with very little temperature change to the walls of the can and the liquid.
The evaporative cooling happens because the pressure of the gas above the liquid is equal to the vapour pressure of the liquid propellant. When you use the spray the pressure inside the can falls, so the liquid propellant evaporates to restore the pressure to the vapour pressure of the propellant. It is the latent heat associated with this evaporation that causes the cooling of the can. The latent heat of evaporation is relatively large so the temperature drop associated with the evaporation is significant.
