What environmental factors are associated with individual differences in political ideology, and do such associations change over time? We examine whether reductions in pathogen prevalence in U.S. states over the past 60 years are associated with reduced associations between parasite stress and conservatism. We report a positive association between infection levels and conservative ideology in the United States during the 1960s and 1970s. However, this correlation reduces from the 1980s onwards. These results suggest that the ecological influence of infectious diseases may be larger for older people who grew up (or whose parents grew up) during earlier time periods. We test this hypothesis by analyzing the political affiliation of 45,000 Facebook users, and find a positive association between self-reported political affiliation and regional pathogen stress for older (>40 years) but not younger individuals. It is concluded that the influence of environmental pathogen stress on ideology may have reduced over time.