My monitor is too big! Can I give my URL with infinite Characters and expect it to work?
The answer is sadly NO!!! There is a limitation to it. Lets see more about it…This is for SharePoint Server 2010 and SharePoint 2013 (as there are no changes reported).
Uniform Resource Locator in short URL consists of the following information on it.
1. Protocol (either http or https)
2. Server name with or without the host (eg:dev01d or s-devsp01:8888)
3. Site information (/Sites/Myownname)
4. Folder path (/Pages or /_layouts/Myownfolder)
5. file name (/AllItems.aspx or myownpage.aspx)
6. Parameters (?id=/sites/Myownname/Shared%20Documents/Promotion/Some%20File.xlsx&Source=http%3A%2F%2Fs-devsp01:8888%2Fsites%2FMyownname%2Fdocuments%2FShared%2520Documents…)
When you go to the site and open the file with Microsoft Office Web Apps, the URL will be as follows:
This string in full is called the URL (along with all the 6 pointers mentioned above) It does look long and lets see if this URL gets approved with the limitation factors.
URL Path length Limitations
When it comes to limitation…SharePoint wants to be fair enough and so it does not consider the parameters length.And the limitations are pertaining to only Un-encoded URLs.
There is NO limitations to encoded URLS.
Lets see what is Encoded and UnEncoded first to understand this better.
URL encoding is needed when we use certain characters in the URL which is not agreeable based on the RFC 1738 specification of URL
So when you encode an URL, all offending(we can say un-accepted instead?) characters are replaced by a % and a two digit hexadecimal value that represents the character in the proper ISO character set. Here are a couple of examples:
- $ (Dollar Sign) becomes %24
- & (Ampersand) becomes %26
- + (Plus) becomes %2B
- , (Comma) becomes %2C
- : (Colon) becomes %3A
- ; (Semi-Colon) becomes %3B
- = (Equals) becomes %3D
- ? (Question Mark) becomes %3F
- @ (Commercial A / At) becomes %40
Source: Free Formatter
All other characters that are accepted belongs to un-encoded category.
Lets go back to the limitations.. Microsoft specifies the below as the URL path lenght limitations to take note.
- 260 Unicode (UTF-16) code units – the characters in a full file path, not including a domain/server name.
- 256 Unicode (UTF-16) code units – the characters in a full folder path, not including the file name and the domain/server name.
- 128 Unicode (UTF-16) code units – characters in a path component, that is, a file or folder name.
- 260 Unicode (UTF-16) code units – the characters in a full path, including a domain/server name for use with Office clients.
- 256 Unicode (UTF-16) code units – the characters in a full path including the domain/server name, for use with Active X controls.
Moral of the story: URL limitation is maximum 256 characters along with domain/server name and file path and 128 characters is the maximum allowed for Folder name or a File name.
For more reference:Technet Site