Permalinks - Absolute URLs and Good Practise

Hi Perch,

What about using the absolute path instead of a full URL?

href="/css/style.css"

The proceeding slash tells the browser that it needs to look in the base directory of the site, so this above example would grab http://example.com/css/style.css regardless of what directory you're currently in.

This also has the benefit that the correct protocol (http/https) will always be used when the browser gets the file.

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com