Author: Fraenkiman
This plugin dynamically adjusts the fade-in delay based on the user's internet connection type and whether they have visited the blog before. It uses localStorage, sessionStorage, and cookies to determine if the visitor has previously accessed the blog, thereby optimizing the delay times.
This can be particularly useful when extensive web fonts or image galleries need to be loaded and you want to improve the user experience.
The plugin works with any theme/style that uses the Leggero theme templates.
When the page is loaded, the fade-in runs in three phases - adaptively controlled according to device, network, visitor status and user settings:
1. quick display of the header
2. adaptive delay for the main area
- fast (e.g. WLAN, 4G): Fade 0.3-0.5 s, delay ~100 ms for new visitors (0 ms for returning visitors) - medium (e.g. 3G): Fade 0.8-1.2 s, delay 500-800 ms / 0-500 ms - slow (2G/slow 3G): Fade 1.5-2 s, Delay 1.5-2 s / 0-1.5 s
3. lazy fade-in of the outer container
4. exceptions and fallbacks
The adaptive fade-in strategy has a number of advantages:
Perceived performance
Optimized for specific networks and devices
Reduced distraction for returners
Lazy loading effect
Accessibility & respect for user preferences
Fallback security
Increasing engagement
dynamicfadein1_1_0.zip | FlatPress 1.3 Andante or higher