Site filtering code optimization