The primary purpose of "ad_return_url" is to return all form and query variables. For instance, if a user’s session times out while filling out a for - regardless of the application or package in use - you wouldn’t want to lose the user’s input. Instead, after revalidating the user credentials via the register page, the user should be seamlessly returned to the partially completed form.
There may be scenarios where returning all form variables is not desired, which raises the question whether "ad_return_url" is the best choice in those cases. To address such concerns, the updated version of "ad_return_url" in the HEAD branch supports now both positive and negative selections of query/form variables for inclusion in the return URL. The new parameters follow the terminology established by "export_vars".
For details, see the commit [1]
Hope, this helps
-g
[1] https://openacs.org/api-doc/proc-view?proc=ad_return_url&source_p=1