Code of No. 12: State-Aware Ajax