decouple content update and ajax transport to reduce similar code