bigskysoftware / bigskysoftware/htmx-extensions

[BUG] Images flicker during HTMX page transition in the preload extension

Open
#151 0 comments 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
JavaScript
Stars
284
Forks
88
PR merge metrics
No merged PRs in 30d

Description

# Issue
Images flicker (briefly showing white background) during HTMX page transitions in Firefox only, even when properly preloaded. We can't see very good on the video but :
- When I refresh the page, click on the link, I can see briefly the white background before showing the image
- When the image is cached, then I never see this white background again ...

```html



HTMX SPA


Home
About
Contact

```

# Details

- Images and links are correctly prefetched in Firefox
- When clicking a link, images briefly flash (white background) before appearing
- This only happens in Firefox, works fine in other browsers
- preload-images="true" attribute is already being used

Any suggestions to prevent this Firefox-specific image flickering during page transitions? I want to to be absolutly instant, even on the first click ! ;)

https://github.com/user-attachments/assets/c20ffeb7-0362-4463-a0ae-381b6fccc1cf

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.