Kenneth Downs wrote:
Chris Shiflett wrote:
You can still use relative URLs. Just use an absolute path:
/css/main.css

So both are actually relative, it is more a matter of relative from where? A "relative" path is relative from the complete path of the HTTP request, while an "absolute" path is relative only from the domain of the HTTP request?


The difference is in the terms "relative/absolute URL" and "relative/absolute path". An absolute URL starts with "(ftp|http|etc.)://" and generally works against you when it comes to caching, etc. An absolute path starts with "/" and indicates that the given resource can be found by appending given path to the site's domain.

Using an absolute path gets you none of the troubles you mentioned with relative path, and none of the caching problems you'd get with an absolute URL.

- A.

--
Allen Shaw
Polymer (http://polymerdb.org)
slidePresenter (http://slides.sourceforge.net)
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to