We investigate how Einstein rings and magnified arcs are affected by small-mass dark-matter haloes placed along the line-of-sight to gravitational lens systems . By comparing the gravitational signature of line-of-sight haloes with that of substructures within the lensing galaxy , we derive a mass-redshift relation that allows us to rescale the detection threshold ( i.e . lowest detectable mass ) for substructures to a detection threshold for line-of-sight haloes at any redshift . We then quantify the line-of-sight contribution to the total number density of low-mass objects that can be detected through strong gravitational lensing . Finally , we assess the degeneracy between substructures and line-of-sight haloes of different mass and redshift to provide a statistical interpretation of current and future detections , with the aim of distinguishing between CDM and WDM . We find that line-of-sight haloes statistically dominate with respect to substructures , by an amount that strongly depends on the source and lens redshifts , and on the chosen dark matter model . Substructures represent about 30 percent of the total number of perturbers for low lens and source redshifts ( as for the SLACS lenses ) , but less than 10 per cent for high redshift systems . We also find that for data with high enough signal-to-noise ratio and angular resolution , the non-linear effects arising from a double-lens-plane configuration are such that one is able to observationally recover the line-of-sight halo redshift with an absolute error precision of 0.15 at the 68 per cent confidence level .