Unlike dyes, AgNPs are quite photostable and do not undergo rapid photobleaching, allowing AgNPs to be utilized as optical probes for Hg2+ detection through the formation of amalgams, subsequently it brings about the visual signal feedback and UV–vis spectrum response of AgNP suspension