🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.acorn.misc
Article #312

Re: Images in Frames

#312
From: Tony Morgan
Date: Sun, 01 Feb 1998 00:00
78 lines
4836 bytes
In article <edd6361148%peter@hightown.demon.co.uk>, Peter Chambers
<peter@hightown.demon.co.uk> writes
>OK. Why not ? I really want to know why (in my newbie-ness).
>
>I go by what I read in "HTML Sourcebook" by Ian S. Graham
>about how URLs are formed and the way that demon homepages
>seem to work.
>
>Given that demon users get "http://www.nodename.demon.co.uk/"
>as the protocol & server domain name part and that "index.html"
>is a default HTML file in the root of that (virtual) server
>then would not "/Imgs" be a directory in the root of the
>(virtual) server and "/index.html" be a reliable reference
>to the default index from any sub-level.
>
>If you could point to a source, say an RFC, where this is all
>defined (eg. in BNF) then I would be grateful.
AFAIK there isn't an RFC, but the pathing mechanism in implicit in all
operating systems that I am aware of (including Unix and DOS).

Althoug it *might* work the way you suggest (and in the particular
example you have quoted - it does), a *lot* of newbie problems are
associated with improper path-naming of the graphics used in their
pages.

It is *always* best practice to use *relative* addressing of *all*
internal links (e.g. graphics, linked site pages and sound files.
So if you (as you have) put your graphics in your Imgs directory, then
if your *entry* page index.htm file is (as it should be) in the root
directory, then you will link to your graphics as "imgs/mypikky.gif".

Now, a more fundamental and *practical* reason why you *should alway;s*
do things the way I suggest.

All *competent* (not professional - just competent) web authors, create
their sites on their hard disk and thoroughly debug the site *before*
uploading it to the server. In this case you would have a directory on
your hard disk called (say) "homepage". You'd put you index.htm in the
(HD) homepage directory,and perhaps put a subdirectory called "Imgs" in
the "homepage" directory. Then of course build their site. Using
*relative* addressing they can run their whole site, check and edit
pages, graphics, sound file etc *on their hard disk* until all works -
which it will *because* they are using relative addressing. Once the
site is bug-free, they can upload their whole site (including sub-
directories from the "homepage" directory onto the server, with the
entry index.htm in the (virtual) server's home directory, and it will be
assured to work OK. If they do it your way it won't - which is the
reason there are so many ppl posting on this ng that their images don't
display!

I know it all seems a little confusing to the newbie who perhaps isn't
familiar with directories and relative addressing. This is *one* of the
reasons why I (to the point of tedium) advocate that those starting out
use the FlexEdit HTML Editor. This editor automatically creates
relative-addressing links for graphics and linked pages. Using FlexEdit
very quickly shows the *best practice* mechanisms using relative
addressing.

If you want to see this relative addressing extended to provide
particular (and in my view - desirable) site characteristics, then have
a look at my site, where you will see that *every* page has an
"index.htm" filename - but the reasons I do this are several and outside
the context of this thread. The more experienced web site authors here
will be able to work out why I do it! 
>
>URL path implementation may, of course, be different for other ISPs !
Exactly... Doing it in a way that works with Demon (and perhaps
otherwise with another ISP) doesn't make it right.
>
>And also using a Web-site editor means that all this arcana
>need not be learned at all.
>
It all depends on the editor. Many ppl here advocate the use of Notepad
as an HTML editor! If an editor is any good, it will translate any
pathnames into relative addressing.
-- 
Tony Morgan
Technical Details
Message-ID: <X6KA8AALxH10EwR3@atomor.demon.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <4810b38a2amike@pyramus.demon.co.uk> <e55fe1048%peter@hightown.demon.co.uk> <gL5dAQADC200Ewt6@atomor.demon.co.uk> <edd6361148%peter@hightown.demon.co.uk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 114044,ec4ad3bcb893c1c1
X-Google-Attributes: gid114044,public
X-Google-Thread: f76f2,ec4ad3bcb893c1c1
X-Google-Attributes: gidf76f2,public
X-Google-Thread: f73c4,ec4ad3bcb893c1c1
X-Google-Attributes: gidf73c4,public
X-Google-Thread: 105bf2,ec4ad3bcb893c1c1
X-Google-Attributes: gid105bf2,public
From: Tony Morgan <tonym@atomor.demon.co.uk>
Subject: Re: Images in Frames
Date: 1998/02/01
Message-ID: <X6KA8AALxH10EwR3@atomor.demon.co.uk>
X-Deja-AN: 321077548
Distribution: world
X-NNTP-Posting-Host: atomor.demon.co.uk [194.222.117.76]
References: <4810b38a2amike@pyramus.demon.co.uk> <e55fe1048%peter@hightown.demon.co.uk> <gL5dAQADC200Ewt6@atomor.demon.co.uk> <edd6361148%peter@hightown.demon.co.uk>
Organization: Atomor Web
MIME-Version: 1.0
Newsgroups: comp.sys.acorn.misc,demon.homepages.authoring,demon.ip.support.archimedes,demon.service.homepages