Absolute vs Relative URLs
Evance treats links in content with absolute and relative URLs differently. Why is that?
TL;DR
Evance recommends and uses relative links by default.
First, let's take a look at the difference between absolute and relative URLs.
Whilst absolute URLs include your full domain and path to your page, the relative URL only references the path after your
domain (starting with a forward slash /
). Since your website's homepage has a URL of
/
, relative URLs may be considered relative to "home".
When to use relative URLs
Use relative URLs when adding links to your own site or images into editable regions.
Evance's content editor defaults to using relative URLs when adding images and links to any editable region on pages, categories or product full descriptions. Relative URLs allow Evance to recognise that the link or image you're adding to the page belongs to the same site. It also enables Evance to perform CDN transformations on image URLs and localisation transformations on page links (see "International websites" below).
When to use absolute URLs
Use absolute URLs when linking to external websites or when you don't want Evance to perform any localisation transformations.
International websites
If you have an international website using Evance's Locale system your URLs may include a locale prefix (e.g. /en-us
).
Use relative URLs to maintain the user's current locale between pages. This is desirable in the majority of circumstances.
Use absolute URLs if you want to navigate the user away from their current locale to another. This may be useful where content is only/always available on a specific locale, but not on all.
Be aware that all relative URLs will maintain the user's current locale even if you include a locale prefix. For example,
let's say you have an English version of your website for China (/en-cn
), and a version
in Chinese (
/zh-cn
). Including the locale prefixes in any of your links will be corrected by Evance
and the current locale be used instead.
Edit mode
Locale and CDN transformations are not currently performed when in edit mode. This may cause odd navigational behaviour in the Editor's "Browse" mode. If you are unsure, you can test your page links in a different browser or using your browser's Incognito mode.