  GRB afterglows close to their peak intensity are among the brightest sources
in the sky. We discuss how GRB optical-to-X-ray afterglows can be used as
probes of the metal enrichment of the interstellar matter in the GRB host
galaxies and of the heating history of the intergalactic matter in filaments
and outskirts of clusters of galaxies along the line of sight. The key points
of the proposed observation strategy are: 1) prompt GRB observations (from
minutes to a few hours); 2) coordinated O-UV and X-ray observations; and 3)
high resolution (1,500-6,000 in the 0.1-1 keV band and >10,000 in the OUV).
