Been trying to score 100/100 on Google's page insights tool, but no matter what i try it won't recognize the .htaccess file (to leverage browser caching for images/font files). The file is currently in the root directory and just copied the .htaccess file from this boilerplate.
This question here has an answer which states:
.htaccess is not directly supported and instead it uses the app.yaml file to accomplish much of what .htaccess provides.
So how exactly do we go about leveraging browser caching in a java based maven project? (which doesn't use app.yaml)
I can't find any documentation about it...
You can configure a cache duration for specific static file handlers in the appengine-web.xml file, as explained here. For example:
<static-files>
<include path="/**.png" expiration="4d 5h" />
</static-files>
Or you handler can set cache durations by returning the appropriate Cache-Control
and Expires
HTTP headers to the browser.