Consider either of these scenarios:
Re-branding/Restructuring/Renaming
- Your organization and its departments are re-structuring and changing names
- Your IT department and content strategists decide on a new naming convention that affects your site names and URLs to access those sites OR you’re changing from http to https
- You have hundreds (thousands?) of documents, links, content queries and script references across your sites that refer to the old URLs and are now broken
Copying Sites/Structures or Creating Templates
- You need to create a team site template that contains default content and page designs
- You create the template with script references, page and promoted links that are absolute
- You have to update all of those links (some perhaps buried deep in your layouts folder) to the new site location URL unless those links are meant to call back to a different site.
Keep in mind that if a user doesn’t have access to the site or subsite library where referenced scripts are held, those scripts won’t run for that user no matter what. This can affect the look, feel, and function of the site which causes confusion and confidence issues when they call and you say “Looks fine to me!” and they have a different experience
Many of these issues and “cleanup tasks” can be avoided (for the most part) by using relative URLs instead of absolute URLs.
Continue reading “Why and when you should be using relative links in SharePoint”