chopficaro Posted May 7, 2010 Share Posted May 7, 2010 i have a question about how relative links work i went to a particular website and saw that i was 2 subdirectories deep, that is i was at www.blabla.com/bla/bla/page then i looked at the source code of the page and saw that the source of an image was src='/images/soso.png' so one would expect that the full address of this image was www.blabla.com/bla/bla/images/soso.png but it wasn't!!! it was at www.blabla.com/images/soso.png this is not how these links usually work. somehow, the browser knew to use the root directory, instead of the current subdirectory of the page. how did it know? Quote Link to comment Share on other sites More sharing options...
teamatomic Posted May 7, 2010 Share Posted May 7, 2010 Take the leading slash to be a literal "root/". HTH Teamatomic Quote Link to comment Share on other sites More sharing options...
chopficaro Posted May 8, 2010 Author Share Posted May 8, 2010 r u kidding me? danm i feel like i should have known that thank you Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.