Yeah, the right way (300-series "moved permanently" codes, which smart
tools will know means update bookmarks and etc.), the icky way ("meta"
headers), and the really, really broken way (JS "navigate" calls, which
simply won't work if your users are using NoScript as a first line of
defense against malware and start out not trusting your site, and also lack
the nice features of 300 redirects).

The only excuse for using meta is if you control the page HTML but not the
server, so can't set 300 redirects up for stale URIs, and there *is* no
excuse for using JS for something that can be done just as easily (or
easier!) without it. :)



On Thu, Jul 25, 2013 at 9:49 PM, Steven Degutis <sbdegu...@gmail.com> wrote:

> There's some problems with acting as if /foo and /foo/ are the same thing.
> I read about it years ago but don't have the link handy. Basically it
> messes with caching and other things, and so it's better to just redirect
> to the canonical one. So if /foo/ is the right one, make /foo redirect to
> it. I forget which kind of redirect though, there's like 3 kinds now.
>
>
> On Thu, Jul 25, 2013 at 8:17 PM, Sebastian Rojas <
> sebastian.rojas.viva...@gmail.com> wrote:
>
>> Checkout this middleware in lib-noir
>> https://github.com/noir-clojure/lib-noir/blob/master/src/noir/util/middleware.clj#L70
>>
>>
>> On Thursday, July 25, 2013 9:08:50 PM UTC-4, Reginald Choudari wrote:
>>>
>>> Hello, I'm trying to figure out what is the best way in handling this
>>> problem.
>>>
>>> Using Ring I have a handlers set to direct routes with relative URI
>>> paths (e.g. "/", "./posts", "/about"). But I would like the URI to be
>>> automatically redirected to "/posts/" and "/about/" with the trailing
>>> slash, so that all my links and references work correctly. If the URI is
>>> without the trailing slash, I'm sure you know what happens to all your
>>> relative paths.
>>>
>>> Any efficient way of dealing with this?
>>>
>>> Thanks,
>>> Reginald
>>>
>>>
>>>  --
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clojure@googlegroups.com
>> Note that posts from new members are moderated - please be patient with
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>  --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to