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

  • Home
  • SEARCH
  • 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 8894843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:36:39+00:00 2026-06-14T23:36:39+00:00

I was reading an article about why relatives URLs should be avoided for web

  • 0

I was reading an article about why relatives URLs should be avoided for web developers ( http://yoast.com/relative-urls-issues ), but what about for things like ajax calls to scripts that are stored somewhere in the same directory hierarchy?

One of the points on why relative URL’s are “still being used” is that

Relative URLs are often used because developers have a test environment on another     
hostname and it makes it easy for them to move stuff between their test environment and 
their live environment. Other reasons include that it’s “just easier in website 
maintenance”. They’re also, in my opinion falsely, promoted by some websites about site 
speed because they’re “shorter” and thus “faster”.

Which is mainly the reason why I am using them as well: having to go through every script carefully replacing all URL’s if I decide to move my application somewhere else seems very error-prone.

To avoid a discussion topic, how can I effectively avoid relative links when I have possibly dozens of relative links spread across multiiple js and php files?

  • 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-14T23:36:41+00:00Added an answer on June 14, 2026 at 11:36 pm

    That link 404’d on me, but i’d imagine the only thing that would make it “faster” would be that there is no need for a DNS lookup when using relative.

    And it’s true, moving from dev, to qa, to prod is easier when using a /contextroot/webservices-location?query formatted url.

    When it doubt, use firebug to profile your scripts if you’re concerned about performance and the server’s reponse time in resolving DNS in your local or external calls.

    Just my two cents.

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

Sidebar

Related Questions

I am reading this article about Optimize Social Plugin Performance http://developers.facebook.com/blog/post/530/ The article describes
Reading through an Article about custom Objects: http://technet.microsoft.com/en-us/library/ff730946.aspx I wonder why i get a
i am reading this article about saving trees into database http://www.dba-oracle.com/t_sql_patterns_trees.htm But i don't
After reading the MSDN article ( http://msdn.microsoft.com/en-us/magazine/2009.01.genevests.aspx ) on implementing a Custom STS using
I'm reading and trying to apply this article about File Uploads , but there
I recall reading an article about constructors being evil (but can't place it). The
I have been reading an article about C++ interfaces ( http://accu.org/index.php/journals/233 ) and I
I was reading this article about the module Javascript pattern , but I don't
I was reading this article about relative time calculation The problem is that the
After reading an article about fonts, i tried the code and i am getting

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.