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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T12:20:37+00:00 2026-06-07T12:20:37+00:00

I have JS and CSS files being served through Amazon Cloudfront. Up until now

  • 0

I have JS and CSS files being served through Amazon Cloudfront. Up until now I was using my own server running Varnish, and when I updated any JS or CSS file or I had to do to use that new version was to increase a counter on a URL param on the request for that file.

So the URL of the file being included would go from …/file.css?r=1 to …/file.css?r=2 and Varnish would think of that as a new file, request it and cache it and serve it from cache from that point on.

With Cloudfront I’m realizing it doesn’t work like that, it still serves the old cached file (and I keep getting “hit from Cloudfront” on the HTTP response).

Any idea if I can change the behavior of Cloudfront for this?

Anything else I can do that doesn’t imply actually changing the name of the file everytime I update the file? I also don’t want to use cache invalidations through Cloudfront’s API. I think that’s too much work for what I’m trying to do here, and there’s a limited amount of (free) requests per month I can make.

  • 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-07T12:20:37+00:00Added an answer on June 7, 2026 at 12:20 pm

    Looks like you were about a month too early… in mid-May of 2012, Amazon announced that you could start using query strings to identify objects in your cloud front cache.

    Here’s a link to the announcement on their blog: http://aws.typepad.com/aws/2012/05/amazon-cloudfront-support-for-dynamic-content.html

    Unfortunately, I don’t see any links in my quick googling that describes how exactly you can do this but I’m sure it’s buried in their documentation or control panel somewhere.

    Hope this gets you going in the right direction.

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

Sidebar

Related Questions

I have a website where some CSS files aren't being served to the browser,
I have some html files with their own css. I want to use them
I have some css files that i need to use in RTL direction template.
I have 2 css files in my page: Site.css jquery-ui.css Site.css is listed BELOW
If I have two css files: File 1: .colorme { background-color:Red; } File 2:
I have a number of .css files spread across some directories. I need to
I have a project with several CSS files, each with many different settings. Every
I have an index.html and global.css files. When I open these files at Coda,
Let's say I have css1.css and css2.css. Just for the sake of keeping files
I have a class that stores paths to CSS and Javascript files in arrays.

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.