page transition : removes unused css and js