[wp-hackers] Two new, long-overdue plugins to make your wordpress life a little easier...
Marcus Pope
Marcus.Pope at springbox.com
Fri Oct 28 17:37:28 UTC 2011
Yes, protocol-relative urls are supported as well, and a great option for referencing third party resources where a domain name *is* necessary. Thanks Rafael, I knew there were people out there that support this concept.
-----Original Message-----
From: wp-hackers-bounces at lists.automattic.com [mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of Rafael Ehlers
Sent: Friday, October 28, 2011 12:34 PM
To: wp-hackers at lists.automattic.com
Subject: Re: [wp-hackers] Two new, long-overdue plugins to make your wordpress life a little easier...
Marcus Pope writes "...trying to deliver HTTPS urls to the browser when you store them all as HTTP..." that's a killer one!
in HTML5Boilerplate Paul Irish uses this on loading jQuery, because of these problems --> http://paulirish.com/2010/the-protocol-relative-url/ (please
read)
Best regards,
Rafael Ehlers
On Fri, Oct 28, 2011 at 2:25 PM, Marcus Pope <Marcus.Pope at springbox.com>wrote:
> > I don't know anybody who's said that they're "not possible".
> > However, we
> do tend to all say that they're a *bad idea*. Which > they are.
>
> Otto, you are just wrong. You cannot use root relative urls in
> wordpress multi-site.
>
> > you may not have considered other cases. What happens when your
> > content
> gets converted into a book, or print? Having
> > the actual full URL, even in the print, would be nice to be able to
> > drive
> traffic back to your site. Things like that, things you
> > didn't think of for the future, are reasons why not to use relative URLs.
>
> You are certainly presumptuous too, I have considered other medium as
> well (as has the entire enterprise development community), when you
> generate a book you prepend the domain to the root relative url in the
> same way a browser does it, or a proper rss reader does with the
> channel link element, or the way every search engine does when
> crawling your site. This is done once on export of the content, not
> always from generation. Unless you do it improperly like print your
> webpage in the browser which gives you NO LINK URL AT ALL just an
> underlined series of words - does that mean we should do away with the
> innerText of anchor elements and only show the fully qualified href?
>
> > The only reason to use relative URLs, in fact, is for migration of
> content from one domain to another. And realistically, this
> > isn't something you should be doing often anyway.
>
> There are dozens of reasons to use root-relative URLs - here are SOME
> of
> them: multiple domain single IP hosting, Multiple country TLDs,
> accessing content on staging dev & production sites, reverse-proxies,
> internal v external NAT rules, debugging load-balanced servers by IP
> address, accessing internal dev environments on an iPhone, following
> DRY & KISS principles, Not HARD-CODING and wasting hundreds of
> processing cycles trying to deliver HTTPS urls to the browser when you
> store them all as HTTP. Please understand that the technology world is not as narrow as you think it is.
> Enterprise web software has been using these techniques for almost
> two decades now, you are just wrong and a trillion dollar industry
> does exist out there that proves it. Why do you think every major
> legitimate MVC framework uses root-relative URL techniques by default
> (J2EE, MVC.NET, APS.NET even, Zend, ROR, Django etc)
>
> > And by using root-relative URLs, you limit this case to only
> > migrating content at the same level to begin with. Domain changing only, basically.
> So it's kind of pointless to do.
>
> They do not limit you, have you ever heard of htaccess url rewrites?
> That's how you solve that problem if you want to change the structure
> of your site without changing the content. Even wordpress has a
> rewrite api module that could handle this.
>
> > A fully qualified URL works every time, everywhere. It's easily
> > parsed by
> search engines.
> Actually, root-relative URLs work everywhere in theory, it's only in
> practice where people make poor programming decisions (like feed
> readers that ignore the channel-link element) that it fails, or
> import/export systems that fail to include base domains in processing
> logic. But root relative URLS are just as easily parsed by search
> engines, so stop preaching your misinformation.
>
>
> -----Original Message-----
> From: wp-hackers-bounces at lists.automattic.com [mailto:
> wp-hackers-bounces at lists.automattic.com] On Behalf Of Otto
> Sent: Friday, October 28, 2011 11:44 AM
> To: wp-hackers at lists.automattic.com
> Subject: Re: [wp-hackers] Two new, long-overdue plugins to make your
> wordpress life a little easier...
>
> On Thu, Oct 27, 2011 at 8:45 PM, Marcus Pope
> <Marcus.Pope at springbox.com>
> wrote:
> > Blown away by the dozens of posts from Core WP developers that root
> > relative urls are not possible
>
> I don't know anybody who's said that they're "not possible". However,
> we do tend to all say that they're a *bad idea*. Which they are.
>
> Using relative-urls, even root relative ones, makes an inherent
> assumption that your content is only viewed on your website itself,
> and only in the context of a web browser. This is not necessarily a correct assumption.
> Furthermore, by making this assumption, you limit the scope of your
> content unnecessarily.
>
> While I'm sure you probably considered the feed-reader case (where
> your content is not displayed in the context of your website and so
> your URLs may not be handled properly by the reader), you may not have
> considered other cases. What happens when your content gets converted into a book, or print?
> Having the actual full URL, even in the print, would be nice to be
> able to drive traffic back to your site. Things like that, things you
> didn't think of for the future, are reasons why not to use relative URLs.
>
> The only reason to use relative URLs, in fact, is for migration of
> content from one domain to another. And realistically, this isn't
> something you should be doing often anyway. And by using root-relative
> URLs, you limit this case to only migrating content at the same level
> to begin with. Domain changing only, basically. So it's kind of pointless to do.
>
> A fully qualified URL works every time, everywhere. It's easily parsed
> by search engines. It works in feed readers. It works no matter where
> your content is displayed.
>
> You most certainly *can* use relative URLs. You just *shouldn't*.
>
> -Otto
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
_______________________________________________
wp-hackers mailing list
wp-hackers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers
More information about the wp-hackers
mailing list