[ACA-1558] cache busting for index.html (#888)

This commit is contained in:
Denys Vuika 2019-01-04 09:36:16 +00:00 committed by GitHub
parent 8fff3b5582
commit 2d59a3354e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 62 additions and 48 deletions

View File

@ -1,27 +1,33 @@
worker_processes 1; worker_processes 1;
events { events {
worker_connections 1024; worker_connections 1024;
} }
http { http {
server { server {
listen 80; listen 80;
server_name localhost; server_name localhost;
root /usr/share/nginx/html; root /usr/share/nginx/html;
index index.html index.htm; index index.html index.htm;
include /etc/nginx/mime.types; include /etc/nginx/mime.types;
gzip on; gzip on;
gzip_min_length 1000; gzip_min_length 1000;
gzip_proxied expired no-cache no-store private auth; gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
access_log off; access_log off;
location / { location / {
try_files $uri $uri/ /index.html; try_files $uri $uri/ /index.html;
}
} }
location ~ \.html$ {
add_header Cache-Control "private, no-cache, no-store, must-revalidate";
add_header Expires "Sat, 01 Jan 2000 00:00:00 GMT";
add_header Pragma no-cache;
}
}
} }

View File

@ -1,56 +1,64 @@
<!doctype html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8" />
<title>Alfresco Content App</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1"> <!-- Important: cache busting for index.html -->
<link rel="icon" type="image/png" href="favicon-96x96.png" sizes="96x96"> <meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />
<style> <title>Alfresco Content App</title>
@keyframes bouncing-loader { <base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/png" href="favicon-96x96.png" sizes="96x96" />
<style>
@keyframes bouncing-loader {
from { from {
opacity: 1; opacity: 1;
transform: translateY(0); transform: translateY(0);
} }
to { to {
opacity: 0.1; opacity: 0.1;
transform: translateY(-1rem); transform: translateY(-1rem);
} }
} }
.bouncing-loader { .bouncing-loader {
display: flex; display: flex;
justify-content: center; justify-content: center;
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 50%; left: 50%;
} }
.bouncing-loader > div { .bouncing-loader > div {
width: 1rem; width: 1rem;
height: 1rem; height: 1rem;
margin: 3rem 0.2rem; margin: 3rem 0.2rem;
background: #8385aa; background: #8385aa;
border-radius: 50%; border-radius: 50%;
animation: bouncing-loader 0.6s infinite alternate; animation: bouncing-loader 0.6s infinite alternate;
} }
.bouncing-loader > div:nth-child(2) { .bouncing-loader > div:nth-child(2) {
animation-delay: 0.2s; animation-delay: 0.2s;
} }
.bouncing-loader > div:nth-child(3) { .bouncing-loader > div:nth-child(3) {
animation-delay: 0.4s; animation-delay: 0.4s;
} }
</style> </style>
</head> </head>
<body> <body>
<main> <main>
<app-root> <app-root>
<div class="bouncing-loader"> <div class="bouncing-loader">
<div></div> <div></div>
<div></div> <div></div>
<div></div> <div></div>
</div> </div>
</app-root> </app-root>
</main> </main>
</body> </body>
</html> </html>