add client side cookie switch to force mock enabling

This function looks like a mixture of 2 and 4.