Skip to content

Commit 304c88c

Browse files
committed
TESTING prefetch (best possible case)
1 parent a7a6809 commit 304c88c

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

index.html

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2069,6 +2069,7 @@
20692069
</style>
20702070
<!-- End STYLESHEET Section -->
20712071

2072+
<link id="LcpLink" rel="prefetch" href="" as="image" />
20722073
<!-- Begin JAVASCRIPT Section -->
20732074
<script>
20742075
function prefetchLargeImage()
@@ -2079,15 +2080,13 @@
20792080
if( sPersonId && sPersonId [ 0 ] )
20802081
{
20812082
sPersonId = sPersonId[ 0 ].replace( 'person=', '' );
2082-
if( data[ sPersonId ] )
2083-
{
2084-
oStartingPerson = sPersonId;
2085-
}
2083+
const link = document.getElementById("LcpLink");
2084+
link.href = `photos/${ sPersonId }.webp`
2085+
link.rel = "preload";
20862086
}
2087-
return `photos/${sPersonId}.webp`;
20882087
}
20892088
</script>
2090-
<link rel="preload" href="photos/quincy.acklen.webp" as="image" />
2089+
20912090
<script id="serviceworker_for_PWA">
20922091
const PROGRESSIVE_WEB_APP = true; // Default TRUE - set to FALSE is you want to disable the serviceworker / PWA because it can be a pain to develop with PWA mode active
20932092
if( PROGRESSIVE_WEB_APP && 'serviceWorker' in navigator )
File renamed without changes.

robots.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
User-agent: *
2-
Disallow: /
2+
Disallow:
3+
# Do NOT use in production!
4+
# delete this file and use robots.production.txt as robots.txt in a production environment ( or just add a / --> Disallow: / )

0 commit comments

Comments
 (0)