Yes, I'd store the status (isComplete, completedCount, etc.) is the session scope. The loop would update this as it iterates, and the AJAX polling would check these.