better caching, fixed cumulative layout shifts!
This commit is contained in:
parent
a37ca06241
commit
2339edcc39
11
nginx.conf
11
nginx.conf
|
@ -10,7 +10,12 @@ server {
|
||||||
|
|
||||||
client_max_body_size 0;
|
client_max_body_size 0;
|
||||||
|
|
||||||
add_header Cache-Control "max-age=14400";
|
gzip on;
|
||||||
|
gzip_types text/plain application/xml text/css application/javascript;
|
||||||
|
gzip_proxied no-cache no-store private expired auth;
|
||||||
|
gzip_min_length 1000;
|
||||||
|
|
||||||
|
add_header Cache-Control "max-age=2628000";
|
||||||
|
|
||||||
server_tokens off;
|
server_tokens off;
|
||||||
|
|
||||||
|
@ -19,6 +24,10 @@ server {
|
||||||
rewrite ^/music/(.*)$ https://mellodoot.com/music/$1 last;
|
rewrite ^/music/(.*)$ https://mellodoot.com/music/$1 last;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location ~* /img/buttons/.*.(png|ico|gif|jpg|jpeg)$ {
|
||||||
|
add_header Cache-Control "max-age=31536000";
|
||||||
|
}
|
||||||
|
|
||||||
location = /give_me_money {
|
location = /give_me_money {
|
||||||
return 301 https://smokepowered.com;
|
return 301 https://smokepowered.com;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,11 +4,12 @@ const hamburger = document.getElementById("header-links-toggle");
|
||||||
function type_out(e) {
|
function type_out(e) {
|
||||||
const text = e.innerText;
|
const text = e.innerText;
|
||||||
const original = e.innerHTML;
|
const original = e.innerHTML;
|
||||||
e.innerText = "";
|
|
||||||
const delay = 25;
|
const delay = 25;
|
||||||
let chars = 0;
|
let chars = 0;
|
||||||
|
let html = "";
|
||||||
|
|
||||||
function insert_char(character, parent) {
|
function insert_char(character, parent) {
|
||||||
|
if (chars == 0) parent.innerHTML = "";
|
||||||
const c = document.createElement("span");
|
const c = document.createElement("span");
|
||||||
c.innerText = character;
|
c.innerText = character;
|
||||||
parent.appendChild(c);
|
parent.appendChild(c);
|
||||||
|
@ -20,7 +21,7 @@ function type_out(e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function increment_char() {
|
function increment_char() {
|
||||||
const newchar = text.substring(chars - 1, chars);
|
const newchar = text.substring(chars, chars + 1);
|
||||||
insert_char(newchar, e);
|
insert_char(newchar, e);
|
||||||
chars++;
|
chars++;
|
||||||
if (chars <= text.length) {
|
if (chars <= text.length) {
|
||||||
|
|
Reference in a new issue