Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8987745
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:51:55+00:00 2026-06-15T21:51:55+00:00

In the MSDN article linked to from this question by @JamesWood, there’s this code

  • 0

In the MSDN article linked to from this question by @JamesWood, there’s this code passage (paraphrased here) for obtaining the server’s name.

function getServerUrl(){
  var serverUrl = this.context().getServerUrl()
  if (serverUrl.match(/\/$/)) {
    serverUrl = serverUrl.substring(0, serverUrl.length - 1);
  }
  return serverUrl;
}

I’m not a JS nor RegEx guru but it seems to me that there’s a possibility of a slash character to be superfluously added at the end of the URL, which we need to deal with.

However, all the answers provided to the said question seem to omit that issue. Did the responders miss that or is the code too protective and can its control be relaxed?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T21:51:56+00:00Added an answer on June 15, 2026 at 9:51 pm

    As far I’ve seen, there’s no difference in on-line and on-premise solutions when it comes to the slash at the end. My explanation is that it’s either a left-over from some older setup or, which is more likely to be the case, a better-safe-than-sorry approach.

    I’ve never used that and I’ve had no issues with the extra slash. Maybe for federated solution…

    My suggestion is that you skip it but that you also keep it in mind making a mental note. In case there will be some strage URL related problems, it could be something to check.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From this MSDN article , there's quite a few ways to hook up a
I have been playing with the demo code from this msdn article by Jeffrey
There is this MSDN article about spcial characters in WPF/XAML : But those Things
According to this article from msdn ( http://msdn.microsoft.com/en-us/library/windows/desktop/ms740496(v=vs.85).aspx ) the struct varies depending on
This example is from the PLINQ MSDN article: http://msdn.microsoft.com/en-us/library/dd997399.aspx var queryA = from num
This MSDN article describes how to ecrypt and password protect a local SQL Server
From this MSDN article it says that the connection string for connecting to the
This MSDN article stated that: processors are free to reorder this code internal static
This MSDN article says: HttpContext: Current is always null when accessed from within a
This question stems from this question Code documentation how much is too much? One

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.