In order to demonstrate the residential requirements for naturalisation you need to:
have been resident in the United Kingdom for at least three years (this is known as the residential qualifying period); and
have been present in the United Kingdom three years before the date of your application; and
have not spent more than 270 days outside the United Kingdom during the three-year period; and
have not spend more than 90 days outside the United Kingdom in the last 12 months of the three-year period; and
have not been in breach of the immigration rules at any stage during the three-year period.
but once you have residence in the uk this applies but only to eu citizens
European Economic Area nationals and Swiss nationals
If you are a European Economic Area (EEA) national or a Swiss national or the family member
of such a person, you will automatically have permanent residence status if you have exercised EEA free-movement rights in the United Kingdom for a continuous five-year period ending on or after 30 April 2006. You do not have to apply for leave to remain.
If you have been outside the United Kingdom for six months or more in any one of the five years of the residence period you will have broken your residence. This does not apply if:
the absence was due to military service
all absences were for under 12 months and were for important reasons such as pregnancy, childcare, serious illness, study, vocational training or an overseas posting
If you leave the United Kingdom for a continuous period of two years or more you will lose your permanent residence status.
If you have indefinite leave to remain (ILR) in the United Kingdom you will be considered settled providing you have not been away for two years or more since you received ILR.