PDA

View Full Version : Did You Know?



darco9x2
05-12-2005, 01:43 AM
not sure if i can actually post this in this forum, but it pertains to html... so.
did you know that you can link to folders, above the current file?
example:
file: xx.gif
foler
xx.html

in the xx.html, you can link to the xx.gif without the whole url, simply put ..\ infront of the xx.gif.
i learned this by downloading movies from wma, by dling from them, adding to a test playlist, then modifiying that to get the url, not sure if its legal. but i learned something. just thot id let you all know, not sure if you new it or not. and yes, ive tested this so it works. but i tested offline, however it should still work online.


... later

ps. please dont ban me if you think this is useless, it can be used for keeping people from takeing files if they dont know wat ../ means. i think

-darco

jscheuer1
05-12-2005, 08:12 PM
example:
file: xx.gif
foler
xx.htmlWhat's a foler? Is the above supposed to be code or a description of the directory (folder) layout?
../xx.gifis a relative path. If used in an html file, it tells the browser that xx.gif is in the folder that contains the current folder so, find it there. Is this what you are talking about?

darco9x2
05-12-2005, 09:28 PM
yah, and i meant folder...

mwinter
05-13-2005, 11:25 AM
did you know that you can link to folders, above the current file?Using '..' to refer to a parent directory has been a basic staple of hierarchical file systems for an exceedingly long time, and has always been a feature of URLs.

I take it you haven't read a post I wrote which covered the basics of relative URLs (http://www.dynamicdrive.com/forums/showpost.php?p=7820&postcount=2)?

There is an omission in that post: network paths, which are a form of relative URL. A network path looks like

//domain.example.com/a/b/x.html

In a document with the URL

http://www.example.com/a/b/y.html

the network path above refers to

http://domain.example.com/a/b/x.html

Essentially, it replaces everything but the scheme (http).

Mike

darco9x2
05-15-2005, 11:32 PM
I take it you haven't read a post I wrote which covered the basics of relative URLs (http://www.dynamicdrive.com/forums/showpost.php?p=7820&postcount=2)?

... no, i hadnt read that.