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 8017585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T20:53:18+00:00 2026-06-04T20:53:18+00:00

Our PHP/MVC webapp lets users upload pictures. They get a link for each image,

  • 0

Our PHP/MVC webapp lets users upload pictures. They get a link for each image, like: http://example.com/images/55 where 55 is the id we store in our database so we can associate users with their pictures. We are not storing the image data inside our database, but actually on Amazon S3.

When the user requests this URL later on, our server produces the actual URL, and issues a header('Location: https://s3.amazonaws.com/example/media/1234') redirect to the browser where 1234 is id 55 obfuscated. We set up this scheme so we can have a ‘permalink’ solution in case the backend changes – the original URL just gets re-mapped behind the scenes.

With this scheme, is it possible to have the client browser cache the entire process? For example, requesting http://example.com/images/55 will avoid hitting our server entirely and request https://s3.amazonaws.com/example/media/1234 directly, or even better, retrieve this image directly from cache. If not, what is the ‘best’ way to structure our link/redirect scheme? We are going to be producing pages with lots of thumbnails and I’d like those to be cached so the UX is smooth.

  • 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. Editorial Team
    Editorial Team
    2026-06-04T20:53:20+00:00Added an answer on June 4, 2026 at 8:53 pm

    To my experience, your request is exactly what happens. The browser, in my case Safari 5 on Mac, hits the script URL, get redirected to the CDN and caches the image under the original script URL…

    I noticed this because I need the opposite. Same sort of situation but in my case the user wants to change their picture. The upload proceeds fine, but the browser keeps showing the old image… (consider this before you proceed on your path)

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

Sidebar

Related Questions

Here is how our current php development solution is set up: Each developer work
Users are uploading fotos to our php build system. Some of them we are
We've moved our site from a php apache site to an asp.net mvc site
I'm currently importing all of our PHP websites into SVN repositories. Each site has
Our company uses an internal PHP MVC framework for most of our projects, which
I have some questions regarding MVC that I would like to clarify. At our
Our PHP scripts create dynamic folders and files and we are having a permission
In a load test of our PHP based web application we can easily reach
I want to allow uploads of very large files into our PHP application (hundred
We currently have an error catching script for all our PHP sites. This script

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.