A strong immune response doesn’t necessarily mean better protection from infection. The type and timing of immune attacks matter, too.