CSS versioning on Google App Engine

I've read that I can use /stylesheets/default.css?{{ App.Version }} for the versioning of the css files on Google App Engine. How does it work? I tried putting the ?{{ App.Version }} at the end of my css files but it brokes the whole page. Am I doing something wrong?

Answers


You don't put version info at the end of your filename, you just append a "version" query parameter when you reference the CSS resources.

  1. Don't change CSS/JS (or other static file) filenames, just change contents
  2. Refer to those files in your HTML via <link rel="stylesheet" type="text/css" href="//host/path/file.css?version">
  3. Everytime you change contents you increase version. You could also use application versions, but you'd have to make sure they do not repeat.
  4. Default caching on static files is 10min. You can set your own cache expiration.

You should append the version number, i.e. (for Java):

String version = SystemProperty.applicationVersion.get();

You can append this string to your CSS file name in your host page.


Need Your Help

R: over-write xy coordinates of raster layer

r coordinates pixel raster r-raster

I have a raster with XY pixel coordinates which I want to convert to lat and long.

Internet Explorer control (or other) rendered onto a directdraw surface

c++ browser directdraw

I'm tasked with modifying an existing c++ codebase which uses directdraw for its UI. Is it possible to make use of a browser control that renders onto one of the (existing) directdraw surfaces? If ...