==Photons do not have rest mass, but they contribute to inertia and gravitate== 

 Hi all, 

 Someone asked at the Physics Wikiproject to clarify the relationship of photons and mass.  I'll do my best! )  I hope everyone will be patient with my explanations. 

 First, photons to contribute to inertia.  That's stated explicitly by Einstein in his 1909 article, The Development of Our Views on the Composition and Essence of Radiation, which I recently translated.  You can find the original german text on the web, but I'm not allowed to post it at the German Wikisource because of copyright issues. 

 Second, photons do gravitate.  Since they have energy, they contribute to the stress-energy tensor and, thus, to the curvature of space time.  Hence, they act gravitationally on other objects.  Conversely, they respond to a gravitational field of other objects; light's path is curved in a gravitational field, as shown (for example) by gravitational lensing.  That's not surprising, since inertial mass and gravitational mass are equivalent in this sense; if we agree that light has inertial mass, it must also respond to a gravitational field.   

 The "weighing" of a box of photons was used by Einstein in a famous thought-experiment to refute the Heisenberg uncertainty principle, .  His idea was that a hole in a box of photons could be opened for an arbitrarily short time, allowing one photon to escape.  The energy of that photon could be measured to arbitrary accuracy by weighing the box before and after the hole opened.  Thus, it seemed that the uncertainty in time and energy could be made as small as possible.  Bohr's refutation (delivered the next morning) was a watershed moment for quantum mechanics. 

 All that being said, light does not have rest mass (to the best of our present knowledge).  That's not a problem, though; the rest mass of an object is its mass in a coordinate frame where the object is at rest.  There is no such frame for light moving through the vacuum; it moves at c in all reference frames.   

 Hope this helps,