What is the difference between Absolute and Relative paths / urls ?

Relative Paths

A Relative URL is a the path to a file relative to the current location. If the file is in the same location as you are in you can just write it’s file name – extension included.
[html] file.jpg [/html]
An alternate is writing a single dot and location delimiter before the file name.
[html] ./file.jpg [/html]
If it’s in a folder
[html] folder/file.jpg [/html]
Of if it’s in a parent directory
[html] ../file.jpg [/html]
Relative URLs are ok for static htmls. If you move the whole directory directory structure will be preserved and you won’t have to change links. Note that they can be tricky when using a CMS as you cannot be sure of the current location – and even if you are the CMS can always change that.

Absolute Paths

An Absolute URL is a full path to the file. It can be accessed from anywhere on the web, from any site as it provides the full address. An example is:
[html] [/html]
The first part is the protocal. For web addresses this is usually http or https – the later being a secure version of http –
The second part is the address ( ) to the directory of the file.
The last part is the file name ( extension included ).

If you are using a CMS like WordPress you should always this type of url as you can easily manage links and access from any location of the CMS.

If you are moving a directory from one location to another and the directory contains htmls with absolute link – note that links should be replaced too.

  • luisa
    May 24, 2012 at 10:47 pm

    could you please answer my questions about your theme Royale???

    this is incredible!

  • notchfood
    March 6, 2015 at 3:20 pm

    Write mega, thats all I have to clear. sbobet Just, it seems as equal proviso you relied by the video to dispose your point. You evidently compose outdated what youre talking about, why lob passed on your intelligence by without delay relocation videos to your weblog when you could follow charitable us impressive enlightening to read?

  • vsp-auto
    March 29, 2015 at 4:12 pm

    Always thinking to do the same thing again and again , i am very thankful that i found this one..

    May 30, 2015 at 8:07 am

    Brillaint work with awesome events conducting. Happy to see your last event and appreciating audience.

  • 10-week-fitness
    June 2, 2015 at 11:08 pm

    Do you mind if I quote a couple of your articles as long as I provide credit and sources back to your blog? My blog is in the very same area of interest as yours and my users would certainly benefit from some of the information you provide here. Please let me know if this alright with you. Thanks a lot!

  • natickhouse
    June 9, 2015 at 6:08 pm

    Hello,I love reading through your blog, I wanted to leave a little comment to support you and wish you a good continuation. Wishing you the best of luck for all your blogging efforts.

  • BiobioMi
    July 16, 2015 at 8:38 am

    With some difficulty you could provide the absolute locations of the boundaries of the state or country but most of the time it s easier to just display a map or describe the relative location of a place like a state or country. What-is-The-Difference-Between-Relative-Location-and-Absolute-Location.

Leave a comment

Your email address will not be published

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

+ 35 = 42

{"type":"main_options","images_arr":"'#ffffff'","enable_ajax":"off","soundcloud_apikey":"","bg_isparallax":"off","bg_slideshow_time":"0","bg_transition":"slidedown","site_url":"http:\/\/","theme_url":"http:\/\/\/wp-content\/themes\/qucreative\/","blur_ammount":"26","width_column":"50","width_section_bg":"","width_gap":"30","border_width":"0","border_color":"#ffffff","translate_leave_a_comment":"Leave a comment","translate_leave_a_comment_to":"Leave a comment to","is_customize_preview":"off","width_blur_margin":"30","gallery_w_thumbs_autoplay_videos":"off","enable_native_scrollbar":"on","content_enviroment_opacity":"30","menu_enviroment_opacity":"70"}