Proper resolution of request url and referer

view full story

http://serverfault.com – I was working on my node server and encountered the need to implement the use of request.headers.referer. When I did tests and read headers to determine how to write the parsing functions, I couldn't determine a differentiation between requests that invoke from a link coming from outside the server, outside the directory, or calls for local resources from a given HTML response. For instance, Going from localhost/dir1 to localhost/dir2 using <a href="http://localhost/dir2"> will yield the response headers: referer:"http://localhost/dir1" url:"/dir2" while the HTML file sent from localh (HowTos)