Autofluorescence of a sample can be taken into account for the choice of the secondary antibody. Autofluorescence can be assessed by imaging a non-labelled specimen sample as a negative control. The laser lines producing highest background or autofluorescence signal can be identified by imaging this negative control using different laser lines. The experimentalist can then avoid using a secondary antibody conjugated with a fluorophore excited by a laser line producing a high autofluorescence or a high background and select instead secondary antibodies conjugated with alternative fluorophore that avoids these pitfalls.
Autofluorescence can be a problem as it could interfere with detection of specific fluorescent signals, especially when the signal of interest is very dim.
Most autofluorescence is detected at shorter light wavelengths with most absorbing in UV to Blue range (355-488 nm) and emitting in the Blue to Green range (350-550 nm). This is especially true for mammalian cells.
Autofluorescence can therefore be a problem in these light ranges as the signal to noise ratio is decreased resulting in reduced sensitivity and false positives.
As there is less autofluorescence at longer light wavelengths, fluorophores which emit above 600 nm will have less autofluorescence interference. The use of a very bright fluorophore will also reduce the impact of autofluorescence. So, choosing a fluorophore with emission spectra in the red and far-red regions will help distinguish specific staining from autofluorescence.
The level of autofluorescence can be determined using unstained controls. So, at the same time, you should run endogenous tissue controls (no primary or secondary antibody) and primary antibody controls (just secondary antibody) to reveal the level of autofluorescence and non-specific binding in immunofluorescence experiments.