Tips and tricks

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.

{"type":"main_options","images_arr":"'#ffffff'","enable_ajax":"off","soundcloud_apikey":"","bg_isparallax":"off","bg_slideshow_time":"0","bg_transition":"slidedown","site_url":"https:\/\/","theme_url":"https:\/\/\/wp-content\/themes\/qucreative\/","blur_ammount":"26","width_column":"50","width_section_bg":"","width_gap":"30","border_width":"0","border_color":"#ffffff","translate_cancel_comment":"Cancel reply","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","content_enviroment_opacity":"30","menu_enviroment_opacity":"70","base_url":"https:\/\/"}