add constant O_DEBUG to set debug mode
always use ajax for every request