add cache-control header for ajax

issue #540