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

  • Home
  • SEARCH
  • 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 7519123
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T01:51:05+00:00 2026-05-30T01:51:05+00:00

I’m using AWS SDK for .NET to upload several images. Before making the PutObjectRequest,

  • 0

I’m using AWS SDK for .NET to upload several images. Before making the PutObjectRequest, I set the max-age and expires headers for far future intervals and dates, respectively.

This is the initial image request:

Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Cache-Control:max-age=0
Connection:keep-alive
Host:assets.mywebsite.com.s3-us-west-1.amazonaws.com
If-Modified-Since:Sun, 19 Feb 2012 18:36:48 GMT
If-None-Match:"f19920f9367b698451d6c964d3ae714a"
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11

Here is the S3 response. It sends back the correct caching headers:

Accept-Ranges:bytes
Cache-Control:public, max-age=31536000
Content-Length:9180
Content-Type:image/jpeg
Date:Sun, 19 Feb 2012 19:16:18 GMT
ETag:"f19920f9367b698451d6c964d3ae714a"
Expires:Sat, 19 Feb 2022 18:36:48 GMT
Last-Modified:Sun, 19 Feb 2012 18:36:48 GMT
Server:AmazonS3

However, every subsequent request still results in a 304 (not a 200 from cache):

Status Code:304 Not Modified

Note, I’m not hitting F5.

I’ve read that when you mix ETags and Expires/Cache-Control, ETags will generally be used for each request and ignore caching altogether. I’ve also read that there is no way to disable ETags in S3.

I’m simply trying to increase speed and decrease costs. Before I give up I figured I’d ask the SO community.

Any Ideas on how to prevent the 304’s?

UPDATE:

It would appear browsers are becoming more and more sophisticated as far as caching goes. As marcind points out, it’s a client browser issue. After testing in other browsers and different scenarios (ie, loading the image directly in chrome (requesting the image url) as opposed to simply viewing the image in the presence of a web page has different effects)

  • 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-05-30T01:51:05+00:00Added an answer on May 30, 2026 at 1:51 am

    What are the headers going out with subsequent requests? Looks like your client might be sending an If-Modified-Since or something similar.

    update: since your client is sending If-Modified-Since Amazon is doing the right thing. This looks like a problem with your client.

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

Sidebar

Related Questions

I am using Paperclip to handle profile photo uploads in my app. They upload
I'm making a simple page using Google Maps API 3. My first. One marker
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I have thousands of HTML files to process using Groovy/Java and I need to

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.