Some canonical short URLs aren't short. In that case, a generated shorturl is probably better.
A heuristic could be: "if the pseudo-short canonical URL is longer than x characters, obtain a "shorturl" from the shortening service, then compare sizes and return the shorter one".
Pick a sensible default "x" and add a config window to let people change that value.
OR, Mossop suggests: "if the page offers its own just give two menu options perhaps".
Some canonical short URLs aren't short. In that case, a generated shorturl is probably better.
A heuristic could be: "if the pseudo-short canonical URL is longer than x characters, obtain a "shorturl" from the shortening service, then compare sizes and return the shorter one".
Pick a sensible default "x" and add a config window to let people change that value.
OR, Mossop suggests: "if the page offers its own just give two menu options perhaps".