Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #84369

Re: [OT] absolute vs. relative URI

References <m9tmt8$hbn$1@reader1.panix.com>
Date 2015-01-24 04:55 +1100
Subject Re: [OT] absolute vs. relative URI
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.18047.1422035741.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Sat, Jan 24, 2015 at 1:47 AM, Grant Edwards <invalid@invalid.invalid> wrote:
> I'm maintaining a web app were the original author(s) went to a little
> bit of trouble to always use absolute URIs in links in the pages.

The advantage is that someone who downloads the bare page will still
be referencing images, CSS, other links, etc, from the original
server. The disadvantage is... exactly the same. These days, it's MUCH
better to use relative links, and then let something like wget rewrite
them as necessary. In fact, if all your links are relative (not even
the leading slash - use ../../../ as many times as is necessary), they
don't even need rewriting, and you can test your web site by just
pointing your browser at the file system.

The original code seems rather fragile. The port number isn't
incorporated, so incoming requests on 8443 will end up going through
to https:// with the default port of 443. Any other port will be sent
back through 80. Strongly recommend not doing this.

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[OT] absolute vs. relative URI Grant Edwards <invalid@invalid.invalid> - 2015-01-23 14:47 +0000
  Re: [OT] absolute vs. relative URI Marko Rauhamaa <marko@pacujo.net> - 2015-01-23 17:18 +0200
    Re: [OT] absolute vs. relative URI Grant Edwards <invalid@invalid.invalid> - 2015-01-23 15:40 +0000
      Re: [OT] absolute vs. relative URI Chris Warrick <kwpolska@gmail.com> - 2015-01-23 17:00 +0100
        Re: [OT] absolute vs. relative URI Grant Edwards <invalid@invalid.invalid> - 2015-01-23 17:10 +0000
      Re: [OT] absolute vs. relative URI Chris Angelico <rosuav@gmail.com> - 2015-01-24 04:48 +1100
        Re: [OT] absolute vs. relative URI Rick Johnson <rantingrickjohnson@gmail.com> - 2015-01-23 11:02 -0800
          Re: [OT] absolute vs. relative URI Chris Angelico <rosuav@gmail.com> - 2015-01-24 06:46 +1100
          Re: [OT] absolute vs. relative URI Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-01-23 20:22 +0000
  Re: [OT] absolute vs. relative URI Chris Angelico <rosuav@gmail.com> - 2015-01-24 04:55 +1100
  Re: [OT] absolute vs. relative URI Tony the Tiger <tony@tiger.invalid> - 2015-01-23 18:21 +0000

csiph-web