Set canonical URL
If a canonical URL is defined, we should set it to where it belongs (<link rel="canonical">), probably best in TopLevelState.toLocation.
Why is this relevant? If javascript is available, we rewrite the URL via history API directly. If it is not, TopLevelState.toLocation does not work, too.
You misunderstood me. I was refering to a canonical embed URL.
To clarify: Canonical URLs are used if there are several URLs pointing to the same resource. The canonical URL then defines which of these URLs should be used by default.
As I pointed out, adhocracy already normalizes its URLs. But there is also the case that one adhocracy installation is embedded in multiple places. In that case it might be a good idea to set a canonical URL.
What is not clear to me is whether this canonical URL should be set in adhocracy (embedded) or on the host.