Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


wdvltalk Roundup
February 2001 - Page 2

March 2, 2001

Absolute link or relative? Which is faster in a navigation bar: <a href="http://www.mysite.com/mypage.html">link</a> or <a href="mypage.html">link</a>?

  • "I don't think there is any difference in terms of speed since for all intents and purposes the two addresses point to the same location. The second addressing mode surpasses the first only in so far as its programming elegance, since it uses relative addressing. This means that you can easily ship your site to various machines without ever touching your HTML only to fix the links."
  • "If you want to split hairs, it could possibly be argued that the fully qualified link "http://foo.com/bar.html" is quicker than the relative link "bar.html", as there isn't the overhead of working out that it's a relative link, retrieving the base href and appending one to the other. This overhead must be around 3 processor cycles so I think you can safely ignore it. I agree completely that the advantages of relative links outweigh any disadvantages that they might have (I can't think of any). Just try and avoid things like '../../' if you can."
  • "I've found you can avoid things like '../../' by making your links relative to root. Example. <a href="/mylink.html">mylink</a> The '/' in front of each link or path ensures never having to change your links when you change hosts."
  • "A lot of sites use '../../' though, usually because their root isn't the server root (if you see what I mean). For example, my BT Internet pages are at http://www.btinternet.com/~johnhaworth/ - if I use '/images' as a relative link, I'm pointing at www.btinternet.com/images which isn't much good to me. As a result I have to stick with either '../images/' or a fully- qualified path."

The long and short of it: "Let's say you have a site that has quite a bit of long content, such as a short story or articles. Do you think it is best to keep the entire story on one page and have the visitors just scroll down while reading, or would it be better to have pages 2, 3, and so on, where they click on 'next,' or an arrow or something to continue?"

  • "I personally think it's best to break up a long article over a series of pages, with navigation on the bottom ... Of course, it depends on what you mean by long. Then I would suggest that you give readers the alternative of a print version all on one page. Studies show that most people don't like to read long articles on screen, and when they do they are more prone to scan or skim rather than read carefully. So it's also important to have the long article broken up into sections; a table of contents at the top or in a side navigation bar is nice, too."
  • "Watch your column width as well, it can be awkward to read across the entire width of the screen, especially at high resolutions ... To an extent it depends on what the content is. A technical or scientific paper can probably get away with a lot more text on the screen and more scrolling than a ... game review."
  • "If you break it up into sections, you can be sure to break it into discreet topics of thought, and list the sections at the beginning of the article. That way, if I'm only interested in one or two sections, I don't have to plow through the whole article. This is very much in line with the way many of us read (or don't read) online. This is especially good if your article has any historical or technical background building, because if I am familiar with the background, I can just skip to the new bits."

Breaking out of frames: "If you have a page that is not in a frame, is there a simple JavaScript that will prevent someone from encapsulating your whole page in a frame, leaving an additional frame for their own advertising?"

  • "This script will cause your page to break out of the frame."
  • 	<!--
    if (window.parent != window.self )
    	{window.open(document.location, '_top'); }
    // -->
    
    [Lines 2 and 3 above are one line. They have been split for formatting purposes.]

Displaying code in HTML: Many times a Web page developer needs to display code on the HTML page, but not have it execute. This is used many times for showing examples. The suggestion made by a list member was to surround the code with <PRE></PRE>. However, this did not quite do the trick. Another list member caught it.

  • [He had] "the right idea by surrounding it with <PRE></PRE>, but didn't go far enough... you should also 'encode' your brackets such as &lt; for '<' and &gt; for '>'. Also, I'm not sure if it is supported in every browser [it is by most—ed], but you might try using the <CODE></CODE> tags in place of the <PRE></PRE> tags"

The fantastic 'Favicon': "How do I make it so that if someone bookmarks my page, they get a cute little icon in their favorites menu instead of the little blue E "



Up to => Home / WDVL / Forum / Roundup




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers