1
0

Load Time Improvements

This commit is contained in:
2025-11-25 12:30:17 -05:00
parent 5209e8cf26
commit 36ff1f2698
3 changed files with 20 additions and 16 deletions

View File

@@ -34,12 +34,9 @@ async function setupPage(browser, { width, height }) {
*/
async function waitForPageFullyLoaded(page, url) {
try {
// Wait for DOM content and stylesheet to load
// Wait for DOM content to load - no artificial delay, stream starts immediately
await page.goto(url, { waitUntil: 'domcontentloaded', timeout: 30000 });
// Wait a brief moment for stylesheet to apply
await new Promise(resolve => setTimeout(resolve, 500));
return true;
} catch (err) {
console.error('Page load error:', err.message);