implementing gag in bad browsers