[wp-hackers] Trailing Slash on Template Tags

Viper007Bond viper at viper007bond.com
Thu May 29 12:28:46 GMT 2008


Thanks Alex, but I'm quite aware of what they are for and how a double slash
works. ;)

My point is the function has been expected to output no trailing slash and
while adding a trailing slash wouldn't break any themes, it would cause
additional load on servers (albeit minor) as well has have the distinct
possibility of breaking some plugins that expect no trailing slash for
coding purposes. Not to mention the double slash looks ugly as heck and
would probably result in a billion support requests from users asking what's
causing it.

Look, I'd love it if the function had originally been coded to output a
trailing slash, but it wasn't and there's no valid reason I've heard so far
to change it. And no, having to type an extra character doesn't count as one
in my book. :)

My 2 cents.

On Thu, May 29, 2008 at 4:30 AM, Alexander Beutl <xel at netgra.de> wrote:

> Viper: Template Tags are used (most of the time) to give you somewhat like
> the templates directory. You will then go and append the / and the file you
> want to access.
> So the old templates (with hardcoded /) would create:
> http://sub.example.org/path/wp-content/templates/mine//custom_style.css
> new ones (without hardcoded /) would create
> http://sub.example.org/path/wp-content/templates/mine/custom_style.css
> which both work the same.
> Users will not expect anything - they will not have anything to do with
> that
> and the template directory will not be a place you want anyone browsing to.
>
> Template Creators would expect the / to be there cause it will be needed
> allways. So I really don't understand your point. Additional /es do not
> harm
> anyone - left out /es will make templates break...
>
> I don't really care if there is a automatic / or not - but I don't see any
> way where this would harm anything....
>
>
> 2008/5/29 Viper007Bond <viper at viper007bond.com>:
>
> > Yeah, it's very minor and users are expecting no trailing slash (which
> > applies to more things than just URLs -- regex, str_replace(), etc.). As
> > the
> > saying goes, If it's not (truly) broken, don't fix it.
> >
> > On Thu, May 29, 2008 at 12:27 AM, Aaron Brazell <emmensetech at gmail.com>
> > wrote:
> >
> > > It is a hit on Apache though. Minor, but Apache needs the slash to
> > > determine
> > > file or directory. It's an access time issue.
> > > Say you type in http://wordpress.org/extend
> > >
> > > Apache responds by looking for a file called extend. Access point A. It
> > > doesn't find it, so it fails back on directory lookup. Access point B.
> > The
> > > slash just saves Apache some access time and a little work. Neglible on
> a
> > > small level. Big on scale.
> > >
> > > Personally, though, I think the slash at this point is moot for what it
> > > gains us.
> > >
> > > On Thu, May 29, 2008 at 3:13 AM, Alexander Beutl <xel at netgra.de>
> wrote:
> > >
> > > > >
> > > > > but it's much too late to add it.
> > > >
> > > > try using // instead of / - tell you what - it works the same.
> > > > There is no difference in going to
> > > > http://wordpress.org//download/
> > > > or
> > > > http://wordpress.org/download/
> > > >
> > > > both work perfectly.
> > > >
> > > > So I would say with that it is not to late to change it since this
> > would
> > > > make both possible (hardcoding the / or not).
> > > >
> > > > Ciao
> > > > Alex
> > > >
> > > > 2008/5/29 Viper007Bond <viper at viper007bond.com>:
> > > >
> > > > > I'd agree if the function was new, but it's much too late to add
> it.
> > > > >
> > > > > On Wed, May 28, 2008 at 10:21 AM, Chris Poteet <cpoteet at siolon.com
> >
> > > > wrote:
> > > > >
> > > > > > Why don't template tags such as bloginfo('template_url') include
> > the
> > > > > > trailing slash?  I mean, it has to be there anyway so why not add
> > it?
> > > > > > _______________________________________________
> > > > > > wp-hackers mailing list
> > > > > > wp-hackers at lists.automattic.com
> > > > > > http://lists.automattic.com/mailman/listinfo/wp-hackers
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Viper007Bond | http://www.viper007bond.com/ |
> > > http://www.finalgear.com/
> > > > > _______________________________________________
> > > > > 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
> > > >
> > >
> > >
> > >
> > > --
> > > --
> > > Aaron Brazell
> > > web:: www.technosailor.com
> > > phone:: 410-608-6620
> > > skype:: technosailor
> > > twitter:: @technosailor
> > > _______________________________________________
> > > wp-hackers mailing list
> > > wp-hackers at lists.automattic.com
> > > http://lists.automattic.com/mailman/listinfo/wp-hackers
> > >
> >
> >
> >
> > --
> > Viper007Bond | http://www.viper007bond.com/ | http://www.finalgear.com/
> > _______________________________________________
> > 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
>



-- 
Viper007Bond | http://www.viper007bond.com/ | http://www.finalgear.com/


More information about the wp-hackers mailing list