couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Melo <andrew.m...@gmail.com>
Subject Re: Pagination and 'pretty' urls
Date Tue, 23 Mar 2010 14:13:27 GMT
On Tue, Mar 23, 2010 at 9:07 AM, Kevin Jackson <foamdino@gmail.com> wrote:
> Hi,
>
> We have the following usecase:
>
> - find all documents between start_key and end_key
> - allow pagination with individual pages ie <prev 1 2 3 4 5 6 7 8 9 next>
> - the links to each page should be 'pretty' (ie SEO friendly)
>
> We have managed to perform the request to retrieve the data, and we
> have a sort of solution to pagination (we can do <prev/next>, but not
> numbered pages).  The final point of making the urls more SEO friendly
> is something that we are investigating.
>
> Currently we use a json object as a start and end key, and we get
> (sort of) paginated results.  If we fix the page size we start to get
> a semblance of 'traditional' pagination.  The problem is that we would
> like to have urls of the form page=1, page=2 etc and at the moment we
> have page?start=[]&end=[].  As we are trying to optimize for SEO
> reasons (don't ask me about this, the Marketing team are quite
> demanding about this kind of thing), the start/end key url params is
> not considered as 'best practice'
>
> I imagine that this kind of pagination is a common idiom and will have
> a set of common pitfalls and solutions.

You could set up either some sort of reverse apache proxy with
mod_rewrite or make a gateway php script to munge your URLs. That way,
you could do whatever you wanted with your URLs and not worry about
what the underlying backend wants you to do.

best,
Andrew



>
> Thanks,
> Kev
>



-- 
--
Andrew Melo

Mime
View raw message