Objective To investigate whether there are differences in the influence of lifestyle on stroke risk in different age groups in Songjiang district of Shanghai.Methods A total of 31 771 study participants from the Songjiang District in the Shanghai Suburban Adult Cohort and Biobank were selected to calculate their healthy lifestyle scores(including non-smoking,active physical activity,balanced diet,and normal body weight)and were followed until December 31,2021.Cox proportional risk regression and Poisson regression were used to determine the HR(95%CI)and RR(95%CI)of different lifestyle or healthy lifestyle scores associated with stroke in various baseline age groups and exposed age groups,respectively.Baseline age was stratified by young(20-<62 years),middle(62-<68 years),and old(≥68 years)groups.Exposure age was stratified by young(20-<65 years),middle(65-<70 years),and old(≥70 years)groups.Results Over a median follow-up of 5.0 years,488 participants developed stroke.After adjusting confounding factors,the associations between non-smoking,active physical activi-ty,balanced diet,or normal body weight and the risk of stroke were not significantly different across age groups,regardless of the method used.The risk of stroke was lower in the group with a score of ≥3 in the young,middle,and old stratum compared with the group with a baseline lifestyle score≤1(HR=0.67,95%CI:0.43-1.03,P=0.072;HR=0.59,95%CI:0.39-0.91,P=0.015;HR=0.64,95%CI:0.42-1.00,P=0.043;RR=0.63,95%CI:0.42-0.96,P=0.028;RR=0.61,95%CI:0.40-0.94,P=0.023;RR=0.63,95%CI:0.40-0.99,P=0.045).Conclusions No age-related differences in the association of different lifestyles with stroke are found among residents of Songjiang District,Shanghai.It implies that a healthy lifestyle should be emphasized regardless of age.In addition,a healthy lifestyle can substantially reduce the risk of stroke.