Currently, it relies (or more accurately XWikiAction#execute relies) on an explicit "?ajax=true" request parameter, but that's obviously not the definition of an ajax request, and it would be better to use a more reliable criterion. For example, Michael Hamann suggested checking the presence of the request header XWiki-Form-Token, which is automatically added to every same-origin ajax requests since 14.10.8. |