[wp-trac] Re: [WordPress Trac] #6599: Inpage URLs can be realtive
instead of being always absolute.
WordPress Trac
wp-trac at lists.automattic.com
Tue Apr 28 15:47:12 GMT 2009
#6599: Inpage URLs can be realtive instead of being always absolute.
-----------------------------+----------------------------------------------
Reporter: hakre | Owner: anonymous
Type: feature request | Status: closed
Priority: normal | Milestone: Future Release
Component: General | Version: 2.7
Severity: normal | Resolution: invalid
Keywords: |
-----------------------------+----------------------------------------------
Changes (by hakre):
* version: => 2.7
* milestone: => Future Release
Comment:
Glad to see you agree to the specs, so we can get into a factual
agrumentation again.
Replying to [comment:6 Otto42]:
> Replying to [comment:5 hakre]:
> > Because a Permalink is an URL/URI, writing it as a relative or
absolute one does not make any difference. Your argumentation just fails
here.
>
> I'm sorry, but you are mistaken.
Please name the point where I am actually mistaken.
>
> If I have a permalink that looks like this:
>
> http://example.com/blog/2009/name-of-post
>
> And it contains a relative image link, like "image.jpg", then that is
going to resolve to http://example.com/blog/2009/name-of-post/image.jpg by
the browser.
You mean, if there is a link on the page "http://example.com/blog/2009
/name-of-post" with the relative URL "image.jpg".
>
> The problem is that image.jpg does not exist there, as the entire
permalink structure (everything after "blog") is pretend.
I have never spoken about putting senseless links into a page. Absolute
links which are senseless would point to the same 404 files. For example
taking the absolute URL "http://example.com/blog/2009/name-of-
post/image.jpg" to link to that nonexisting image would lead to a 404 as
well. It is a question of creating URL that leads to a 200. That URL can
be realtive or absoulte.
> It's make-believe. The directories don't actually exist. That's what the
rewriting is all about.
Can you imagine that it is possible to provide a valid realtive link?
> > Another misunderstanding. Relative URLs are always built upon the
current URL -or- the BASE element. The term "from root" is misleading here
and only named so that you can start another invalid and misleading
argumentation:
>
> Umm.. No. Sorry, but you're wrong again.
You said you stick with the terms. I do not need to speak for myself with
that one, just take a look into the docs:
http://www.w3.org/Addressing/rfc1808.txt with Focus on Sections "3.
Establishing a Base URL" and "4. Resolving Relative URLs".
> Here's two examples:
> IMG SRC="/blog/uploads/2009/image.jpg"
> IMG SRC="image.jpg"
>
> Both of those are relative.
TRUE
> The first one is root-relative (as it include the leading /) , and using
that format would actually work. A browser would not resolve it from the
current path, but from the current domain (the leading slash makes it do
that).
As in the first point: You can't compare an 404 leading links with a 200
leading link. If the Post has the following Permalink:
"http://example.com/supersite/special/blog/2009/name-of-post"
> Here's two examples:
> IMG SRC="/blog/uploads/2009/image.jpg"
> IMG SRC="image.jpg"
will lead to 404 both.
>
> > Well if there would be "a very good reason", then please name it. Or
proof the Opposite of: "Using absolute URLs (and/or the BASE Element) in
Webapps is for coding noobs. This is done by those who did not understand
how links work or who do not want to solve linking properly and stable."
>
> In order to disprove that nonsensical claim, it would first have to be
demonstrated at all in some way. The idea that one-way or another-way is
for "noobs" is simply ridiculous on the face of it.
>
> Relative URLs make sense in some situations, and absolute URLs make
sense in others. There is never a one-size-fits-all solution, and only
"noobs" would think otherwise. ;-)
Well, I do not like to have that much focus on the Noob argument but more
in the arguments for using realtive links:
- There is actually no argument for or against realative vs. absolute.
- All links are absolute at least for a user using a website.
- The website itself can therefore provide relative links.
- There is no need to have absolute links (only) in the output from
server-side.
- There is _absolutely_ no need to have absolute links hardcoded in
database data. Infact, this leads to problems (as documented).
- Because there is no need that there must be absolute links in the
output, it is more wise to handle relative URIs in (database) data to
convert them to links useable to (the current and often changing) Blog
configuration.
>
> > Have you ever taken a look how WordPress does link to files? That is
all but _not_ done properly. In opposite to what you write, the URLs hard
hardcoded into the content and not generated by "using bloginfo('url')"
when the page is displayed.
>
> I am aware of that. It's a problem, admittedly, but if you've examined
the importer, there's a method it uses to correct those links when you use
an Export/Import and migrate attachments in that manner.
Well, that is why it is sooo much easier to get over these problems and
provide absolute links. So if wordpress would use realtive links, that
would be a sign that it has been taken care of something.
>
> > Re-Opening this as feature request. It's not invalid and many pplz.
over and over dicuss about this in the community.
>
> Closing it as invalid again, because it is. Don't reopen it without some
form of, you know, logic. Or at least knowing what you're talking about.
Having relative pointer to image/file data within blog-post-data can help
to more easily migrate and reconfigure a blog.
>
> Also, Trac is not the place for debate on whether something is a good
idea or not. Take it to wp-hackers if you want to debate it.
This is a feature request not a debate.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/6599#comment:9>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list