fix(ajax): better distinction between no-ajax and ajax code