mirror of
https://github.com/BradNut/awesome-uses
synced 2025-09-08 17:40:31 +00:00
try content-visibility: auto
This commit is contained in:
parent
7358ccb06a
commit
54086784a0
3 changed files with 4 additions and 7 deletions
|
|
@ -44,7 +44,7 @@
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "netlify build",
|
"build": "netlify build",
|
||||||
"dev": "NODE_ENV=development remix dev"
|
"dev": "NODE_ENV=development netlify dev"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/styled-components": "^5.1.26",
|
"@types/styled-components": "^5.1.26",
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,7 @@ export default async function handleRequest(
|
||||||
) {
|
) {
|
||||||
// check if we have a cached response in memory
|
// check if we have a cached response in memory
|
||||||
const cachedResponse = cache.get(request.url);
|
const cachedResponse = cache.get(request.url);
|
||||||
const isBuildUrl = request.url.includes('/build/');
|
if (cachedResponse) {
|
||||||
if (cachedResponse && !isBuildUrl) {
|
|
||||||
// console.log('Serving from cache', request.url);
|
// console.log('Serving from cache', request.url);
|
||||||
// if we have a cached response, check if it's less than 5 seconds old
|
// if we have a cached response, check if it's less than 5 seconds old
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
|
|
@ -64,7 +63,6 @@ export default async function handleRequest(
|
||||||
// tee the stream so we can cache it and send it to the client
|
// tee the stream so we can cache it and send it to the client
|
||||||
const [toReponse, toCache] = body.tee();
|
const [toReponse, toCache] = body.tee();
|
||||||
|
|
||||||
if (!isBuildUrl) {
|
|
||||||
streamToText(toCache).then(html => {
|
streamToText(toCache).then(html => {
|
||||||
console.log('Caching', request.url);
|
console.log('Caching', request.url);
|
||||||
cache.set(request.url, {
|
cache.set(request.url, {
|
||||||
|
|
@ -72,7 +70,6 @@ export default async function handleRequest(
|
||||||
date: new Date(),
|
date: new Date(),
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
const headers = new Headers(responseHeaders);
|
const headers = new Headers(responseHeaders);
|
||||||
headers.set("Content-Type", "text/html");
|
headers.set("Content-Type", "text/html");
|
||||||
|
|
|
||||||
|
|
@ -97,8 +97,8 @@ body::-webkit-scrollbar-thumb {
|
||||||
grid-template-rows: 1fr auto auto;
|
grid-template-rows: 1fr auto auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.PersonWrapper:nth-child(5) {
|
.PersonWrapper:nth-child(6n) ~ .PersonWrapper {
|
||||||
background: green;
|
content-visibility: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.PersonInner {
|
.PersonInner {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue