The extended smokebox was developed by John Thompson, and first employed on a locomotive in 1860. The idea was that the sparks would collect in the extended part of the smokebox and eliminate the need for the large funnel or diamond stacks then in use.
It wasn't quite that simple. The extended smokebox didn't draft as well, and even though some locomotives were fitted with smokeboxes 9 feet(!) long, sparks often were still thrown out the stack.
After some trials a screen was developed which lay in the extended smokebox at about a 45* angle. sparks hitting the screen were crushed against the mesh and extinguished. some locomotives used a mesh box which mounted on the blast nozzle and surrounded the base on the stack. Others had a thin plate with a small opening at the bottom arranged like the screen, forcing all sparks down through the opening before they could be drawn to the smokestack.
even with the extended smokebox some railroads continued to use diamond stacks as a further fire safety measure