update cookie and clearrank