Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 43813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T15:33:15+00:00 2026-05-10T15:33:15+00:00

I have URLs of the form http://domain/image/⟨uuid⟩/42×42/some_name.png . The Web server (nginx) is configured

  • 0

I have URLs of the form http://domain/image/⟨uuid⟩/42x42/some_name.png. The Web server (nginx) is configured to look for a file /some/path/image/⟨uuid⟩/thumbnail_42x42.png, and if it does not exist, it sends the URL to the backend (Django via mod_wsgi) which then generates the thumbnail. Then the backend emits a 302 redirect to exactly the same URL that was requested by the client, with the idea that upon this second request the server will notice the thumbnail file and send it directly.

The question is, will this work with all the browsers? So far testing has shown no problems, but can I be sure all the user agents will interpret this as intended?

Update: Let me clarify the intent. Currently this works as follows:

  1. The client requests a thumbnail of an image.
  2. The server sees the file does not exist, so it forwards the request to the backend.
  3. The backend creates the thumbnail and returns 302.
  4. The backend releases all the resources, letting the server share the newly generated file to current and subsequent clients.

Having the backend serve the newly created image is worse for two reasons:

  1. Two ways of serving the same data must be created;
  2. The server is much better at serving static content. What if the client has an extremely slow link? The backend is not particularly fast nor memory-efficient, and keeping it in memory while spoon-feeding the client can be wasteful.

So I keep the backend working for the minimum amount of time.

Update²: I’d really appreciate some RFC references or opinions of someone with experience with lots of browsers. All those affirmative answers are pleasant but they look somewhat groundless.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T15:33:16+00:00Added an answer on May 10, 2026 at 3:33 pm

    If it doesn’t, the client’s broken. Most clients will follow redirect loops until a maximum value. So yes, it should be fine until your backend doesn’t generate the thumbnail for any reason.

    You could instead change URLs to be http://domain/djangoapp/generate_thumbnail and that’ll return the thumbnail and the proper content-type and so on

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 66k
  • Answers 66k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer It can't be done the way it's described in the… May 11, 2026 at 11:34 am
  • added an answer Alekc has it right. Your form code is this: <form… May 11, 2026 at 11:34 am
  • added an answer Your read and write functions are buggy. In particular, you… May 11, 2026 at 11:34 am

Related Questions

I have URLs of the form http://domain/image/⟨uuid⟩/42x42/some_name.png . The Web server (nginx) is configured
I'm still working with this huge list of URLs, all the help I have
Sorry the title isn't more help. I have a database of media-file URLs that
I have a text file of URLs, about 14000. Below is a couple of
I have an sqlite database full of huge number of URLs and it's taking
I am writing a Jython script to sort a list of URLs. I have
I receive a list of image URLs and currently I have several hidden img
I'm having a bit of a problem here. We have 2 urls let me
I have a PHP application that will on occasion have to handle URLs where
I have a site with URLs like this: http://domain.co.uk/subdir/page.php I have redesigned the site

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.