mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-08-03 20:45:34 +08:00
Using browser context for social cards
Scott Hanselman recommended using the context instead of the browser object. Browser object creates a new context on each call which is a new process. Obviously we don't want that. Also added an extra check for a load based on network idle. This will not only ensure things are loaded, but there is a built in 500ms timeout looking for inactivity which will let the font rendering process do it's thing which seems to lag a tad with Chromium. And while we are at it, preloading the font can't hurt.
This commit is contained in:

committed by
Patrik Svensson

parent
223642b797
commit
c2b25eea8a
@ -8,6 +8,7 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<link rel="preload" as="font" href="/static/CascadiaCodePL.woff2">
|
||||
<link rel="stylesheet" href="static/styles.css" />
|
||||
</head>
|
||||
<body>
|
||||
|
Reference in New Issue
Block a user