Yep and WW1 increased the strength of the defense yet again with the introduction of cordite which was a smokeless powder, before that you had all these guys firing and the thick smoke would drop visibility to only a few meters very quickly. In WW1 they could fire repeated volleys with good visibility, the only reasonable response for the attacking army was to burrow below the hail of accurate fire into shallow foxholes that expanded and expanded to become the miles of trenches. That in itself was interesting as in the very early stages the trenches were straight which meant that a small force that managed to take part of the trench could use enfilading fire along the trench and wipeout huge numbers of enemy troops. So after a while they started building these zig zag ones: