the first Census to record military personnel abroad
The 1911 Census was the first one to have a full enumeration carried out of the British Army serving overseas, including details of wives and families. In earlier censuses the military authorities only provided the Census Office with the numbers of officers, other ranks, wives and children, either by place or by regiment.
I have found wives and children living officially in the barracks abroad 1911 in India, but seperately and a few pages later from their serving husband/father.
Similarly for the 1921 according to FindMyPast "All armed forces establishments are included [apart from those stationed in Scotland]. This includes temporary camps, training sites, military hospitals, detention barracks and married quarters."
"The armed forces had special census returns which carry the code NM...There are several page types within each NM form. The main part of the return deals, of course, with serving officers and other ranks or ratings. However, there is often a section headed the “Return of all persons OTHER than serving officers and other ranks or ratings” – in other words, civilians, including wives and family. Note that the wives and children are therefore on different pages and not linked to the servicemen to whom they are related."
see Armed forces under
https://search.findmypast.co.uk/search-world-records/1921-census-of-england-and-wales#search-tipsFor 1911 see Searching military establishments and royal navy ships overseas
https://search.findmypast.co.uk/search-world-records/1911-census-for-england-and-walesand eg
https://www.britisharmyancestors.co.uk/blog/the-british-army-in-the-1911-census/ and this complaind about Ancestry splitting the cover pages
https://www.greatwarforum.org/topic/196781-1911-census-for-military-overseas/ which likely does not apply to FindMyPast.