We compute the afterglow of gamma-ray bursts produced by purely electromagnetic outflows to see if it shows characteristic signatures differing from those obtained with the standard internal/external shock model. Using a simple approach for the injection of electromagnetic energy to the forward shock we obtain the afterglow evolution both during the period of activity of the central source and after. Our method equally applies to a variable source. Afterglow light curves in the visible and X-ray bands are computed both for a uniform medium and a stellar wind environment. They are brighter at early times than afterglows obtained with the internal/external shock model but relying only on these differences to discriminate between models is not sufficient.