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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:10:55+00:00 2026-06-10T00:10:55+00:00

I am playing a bit with Play! 2.0.2. My project is new and the

  • 0

I am playing a bit with Play! 2.0.2.

My project is new and the only things I changed are the HTML in the views/ directory and the main.css file in the public/ directory.

The problem is that even when I make a modification to the CSS file, the application still responds with a 304 Not Modified. Ctrl+R and F5 don’t fix the problem. The only way to really refresh the page is to go into the browser’s settings and clear the cache. Then the CSS will update, but for the next request only.

Play! seems to consider every file the public/ directory as unchanged even when it’s not the case.

Do you have any idea how to fix this?

  • 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-10T00:10:57+00:00Added an answer on June 10, 2026 at 12:10 am

    That’s rather proper situation, that CSS files are not downloaded after each page refresh from the server.

    Find keyboard combination in your browser for reloading the page with cache refreshing for development cycle (typically it’s Shift + F5 orShift + Ctrl +R).

    The other problem is how to tell 1 million of your users to press the combination after changes to the live site: the easiest way is just addiing an unique string to the CSS/JS filenames:

    <link rel="stylesheet" href="/assets/css/main/css?12345" />
    

    You can do that on many ways,

    • First just add this manually and after important changes in the CSS/JS change also ?12345 to ?34567 for all files

      <link rel="stylesheet" href='@routes.Assets.at("css/main.css")?12345'>
      
    • Second – semi-automatic: use some controller’s method for generating timestamp

      <link href='@routes.Assets.at("css/main.css")?@Application.timestamp()' rel="stylesheet">
      <script src='@routes.Assets.at("js/scripts.js"?@Application.timestamp())' type="text/javascript"></script>
      
    • And create timestamp() method in Application.java

      public static String timestamp(){
          // here you can add some more control
          // but DON'T set new timestamp each time, 
          // cause you'll make the browser's cache useless
          return "12345";
      }
      
    • Third solution would be the best option for future live site: use Application.timestamp() to set custom timestamp for each file. In such case you could change/reset them when required without need to recompile the app and sending jars back to the server. Of course in this scenario you shouldn’t keep the CSS files in the Play’s public folder, instead it’s better to use frontend HTTP server for serving them from some FTP location and use Play’s database for storing paths only.

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

Sidebar

Related Questions

I finished NerdDinner tutorial and now I'm playing a bit with project. Index page
I'm playing a little bit with the new StackOverflow API . Unfortunately, my JSON
I'm trying to play a PCM_UNSIGNED 11025.0 Hz, 8 bit, mono, 1 bytes/frame file
I'm struggling to get a WAV file to play on a HTML page as
In a Scala worksheet I can do this: object Play { println(Playing a bit)
I'm playing a bit with beta version of PHP Storm (PHP version of WebIDE)
I am playing a bit with fork/vfork functions, and there is something that is
Recently I've been playing a bit with Groovy and Grails and I have to
After playing quite a bit of Bad Company 2 over the last month, I'm
I am playing a little bit with htaccess to know apache with xampp. I

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.