Skip to main content
Topic: redirect after GET request as part of the website backend ? (Read 700 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

redirect after GET request as part of the website backend ?

Hello,

I just had the idea to use redirects in server side code of a website to reduce SQL-queries, but I am not sure if it's a good idea:

Usually, I have always had 3 queries for a single photo page, like for example `/photos/5`.
One for the "photo 5", and 2 for the "previous photo" and "next photo" links.

The idea is now to make only 1 query for "photo 5" and then create links in the form `/photo/5/prev` and `/photo/5/next`, and the server  will then redirect to `/photos/4` or `/photos/6` (or what is previous and next).

I suppose this is somehow bad design or not good for SEO, but I don't know why. Should I not try it, and why not? Or would it be no problem?

thanks.