Does squeezing a bottle of beer/soda helps from going flat? I would like to resolve a dilemma of squeezing or unsqueezing a bottle of beer/soda in order to keep the beer/soda for as long as it is possible from going flat.
I would like to ask 3 questions that should resolve it. I expect from the answers to these questions these outcomes:
Q1: To see if squeezing is a good practice or harmful
Q2: To see if it is better to squeeze it or not
Q3: To see if Q1 and Q2 doesn't change in different conditions (fridge, warm outside)
Questions:

*

*Does squeezing(squeezing all the air out) an unfinished(with for example 2/3 liquid) bottle of soda/beer (with Carbon dioxide) helps from going flat?

*Is it better to keep the bottle unsqueezed or to squeeze it?

*Does different temperature (between 0C to 40C) of the environment changes the answer to point 2)?

Note: The bottle is plastic, thus possibility of squeezing
 A: To keep a soda from going flat, you want to keep C$O_2$ (the gas) in solution and in the bottle. By squeezing the bottle, you will be expelling the gas from the bottle and leaving a lower pressure in the bottle after the cap is replaced. Both actions will disturb the equilibrium and cause more gas to come out of solution as the bottle returns to its normal shape. (Come to think of it, if you squeeze with a clamp which maintains the squeeze, that should help.)  It is better to open a bottle which is cold.  The pressure will be lower inside and less gas will escape.  An ideal dispenser takes fluid from the bottle without letting any gas escape, but more empty space in the bottle lets more gas come out of solution.
A: If you squeeze out the air before putting on the lid, then whether this helps depends on whether you keep the bottle squeezed until you reopen it.
If you keep the bottle squeezed, there will be less room for gas to escape from the liquid and you will keep more fizz in the liquid.
If you do not keep the bottle squeezed, the tendency of the bottle to return to its normal shape will suck gas out of the liquid and you will lose fizz.
This answer is not changed by temperature.
There is one other consideration. If this is a live beer (and perhaps some other liquids), and you do not squeeze out the air, then the presence of oxygen in the air will allow an interaction which will impair the flavour. The same is true for wine. You can keep wine longer using a vacuum pump to remove air from the bottle and sealing it with an appropriate stopper (sold with the pump). In this case, there is no fizz to preserve.
A: The key to this is the partial pressure of CO2 in the gas above the soda.

*

*If you pour out some soda and then close the cap and wait a while, the partial pressure of CO2 above the soda will reach equilibrium with the soda.  Since you let some air rush in, which doesn't contain much CO2, before replacing the cap, this will require a little CO2 coming out of the soda and the soda will have gotten a little flatter.  If you now squeeze out the air and replace the cap, the soda and the space above the soda will again try to equilibrate until the partial pressure of CO2 in the atmosphere above the soda and the liquid are again exchanging CO2 evenly... as much CO2 is coming out of solution as is going in.  That means more CO2 will come out of the soda.  This is clearly not a good strategy.


*If you pour out some soda and quickly replace the lid, air (with practically no CO2 in it) will rush in and the pressure above the liquid will be one atmosphere BUT the partial pressure of CO2 will initially be zero.  As the bottle sits around the CO2 in solution will equilibrate with the atmosphere above until the partial pressure is in equilibrium with the dissolved CO2.  That's why a resealed soda bottle feels slightly pressurized.  It was at atmospheric pressure before CO2 started to come out of solution.  This is the normal case and not as bad as #1.


*If you pour out some soda while squeezing the bottle and quickly replace the cap, the space above the liquid will repressurize to a partial pressure of CO2 that is in equilibrium with the liquid. There will not be any air above the liquid, only CO2. This may be below atmospheric pressure, in which case the bottle will stay slightly indented.  This means that only an amount of CO2 has come out as if you just replaced the cap on the bottle.  So this is the exact same case as #2.  In the best case, squeezing the bottle  is no different than replacing the cap quickly.


*If you pour out some soda and DO NOT replace the lid quickly, air (with practically no CO2 in it) will first rush in and the pressure above the liquid will be one atmosphere BUT the partial pressure of CO2 will initially be zero.  CO2 will come out of solution and some will escape out of the top of the bottle. As the bottle sits around the CO2 in solution will equilibrate with the atmosphere above until the partial pressure is in equilibrium with the dissolved CO2 but the continued loss of CO2 out the top will eventually result in the soda going flat.  This is the worst case.
At higher temperature, the partial pressure of CO2 above the liquid will increase.  Hot soda dissolves less gas.  The soda will have gone slightly flatter (but will not continue to go flatter).  If you chill the soda, the partial pressure of CO2 should go down keeping more of the CO2 in solution.
So my recommendation is:  Don't squeeze the bottle unless you are scrupulous in squeezing it as you are pouring out soda and then replacing the cap immediately.  Even if you do this it will be no better than just replacing the cap quickly!  Put the soda back in the refrigerator as soon as possible and only open it when it is very cold.
One of the worst ever "unphysical" gadgets sold is based on a misunderstanding of partial pressure equilibrium.  There is a small pump attached to a soda bottle lid that purportedly "pressurizes" your soda bottle so that it will not go flat.  If you have read the above you will understand why this doesn't work at all.
