linking to images using the full url won't have any effect on how many connections are open unless the hostname in the url is different from the hostname of the page (eg, if the page is http://www.example.com/index.html and it links to http://example.com/index.html that might make for an extra connection). even if that's the case, that's pretty minor. the main problem with using the full url is that it makes it hard to change things. say you've got a development version on a staging machine and a production version on another machine. if the designers want to change the look of the site on the dev version, they can't just swap out new images because it would affect the production version too.

what can you do about it?

without knowing more about your specific setup, it's hard to tell. some cleverness with relative paths (eg, 'img/navleft.jpg') and symlinks might do it. or you could slurp in the files and use a regexp to fix things however you want them. if the scripts are at least on the same server as the images and templates (eg, in /cgi-bin/) you can probably get away with just specifying the images using syntax like '/img/navleft.jpg' giving the full path from the document root. that would link to http://www.example.com/img/navleft.jpg no matter where on the server the page is.

anders pearson


In reply to Re: Using HTML templates by thraxil
in thread Using HTML templates by citro

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.