Descripción
Not every visitor has fast, unlimited internet. In many parts of the world, mobile data is expensive and connections are unreliable. A heavy page with autoplay video, large images, embeds and web fonts can cost those visitors real money, or make them leave before the page loads.
LeanVisit detects visitors who are likely to benefit from a lighter page and serves them a leaner version automatically. Everyone else sees your normal site, unchanged.
How detection works
LeanVisit uses these signals:
- Save-Data header: sent by browsers when the visitor has turned on Data Saver / Lite Mode.
- Connection type: a tiny script reads the browser’s Network Information API (where supported) and flags 2G and slow-3G connections.
- Manual switch: adding
?leanvisit=liteto any address turns lite mode on for that visitor, and?leanvisit=fullswitches back. The[leanvisit_switch]shortcode outputs ready-made switch links.
What lite mode does
- Videos: stops autoplay and prevents preloading, so video data is only downloaded when the visitor presses play.
- Images: limits the responsive image sizes offered to browsers (srcset) to 768 px wide or smaller.
- Embeds: YouTube, Vimeo, Dailymotion and Google Maps embeds become click-to-load placeholders.
- Fonts: skips Google Fonts, Bunny Fonts and Adobe Fonts stylesheets loaded through WordPress, so visitors see system fonts.
- Scripts: lets you choose scripts and styles (chat widgets, sliders and similar) to skip in lite mode.
A clear settings page
The settings screen explains everything in plain language:
- How it works in three steps.
- Before and after for every feature, so you know exactly what changes for a lite mode visitor.
- Who gets lite mode and who keeps the normal site.
- Test your site: LeanVisit loads one of your pages as a normal visitor and as a lite mode visitor, then shows a side-by-side result (autoplay videos, embeds, web fonts, scripts, largest image offered).
- Caching notes to help you set up your cache correctly.
Safe by design
- Exclude list: list pages (for example
/checkout/or/my-account/*) that must always show the normal site, even to visitors on slow connections. - Shop pages protected: WooCommerce and Easy Digital Downloads cart, checkout and account pages are never changed (can be turned off).
- Admin bar indicator: administrators see «LeanVisit: Lite» or «LeanVisit: Full» in the admin bar, with the reason and one-click links to view the page either way.
Why LeanVisit?
- Zero configuration needed to get started: activate it and choose what lite mode should change.
- Normal visitors are never affected.
- Small footprint: the front-end script is only a few kilobytes.
- No external services, no tracking, no account required.
Important notes and limitations
- The Network Information API is not supported by all browsers (for example, Safari does not support it). Visitors on those browsers are detected through the Save-Data header or the manual switch only.
- For connection-type detection, the first page view is served in normal mode and lite mode applies from the next request.
- If you use a page caching plugin or CDN, lite and normal pages must be cached separately. LeanVisit sends a
Vary: Save-Dataheader and uses a cookie to help with this. See the FAQ for setup guidance. - Some page builders and themes load fonts or embeds in their own way, and those are not changed.
- Removing scripts and styles can affect page layout or features. Use the exclusion list carefully and test your site in lite mode.
Privacy
LeanVisit does not collect, store or transmit personal data, and it makes no requests to external services.
It sets one first-party session cookie, lvisit_mode, which stores the value lite or full so that the chosen or detected mode is remembered until the browser is closed. It contains no personal information. Depending on your local laws and how you classify functional cookies, you may want to mention this in your cookie or privacy policy.
Instalación
- Upload the
leanvisitfolder to/wp-content/plugins/, or install the plugin from Plugins Add New. - Activate the plugin through the Plugins screen.
- Go to Settings LeanVisit and choose which optimizations lite mode should apply.
- Visit your site with Chrome DevTools throttling set to «Slow 3G», or with Data Saver enabled on an Android device, to preview lite mode.
Preguntas frecuentes
-
Will this change my site for all visitors?
-
No. Lite mode only applies to visitors who send the Save-Data header, are detected on a slow connection, or choose lite mode themselves.
-
How can I test lite mode?
-
Add
?leanvisit=liteto any URL to switch on lite mode for your browser, and?leanvisit=fullto switch it off. You can also use Chrome DevTools network throttling or the Data Saver setting on Chrome for Android. -
Does it work with caching plugins?
-
Yes, with correct setup. Because lite and normal versions of a page differ, your cache must keep them separate. LeanVisit sends a
Vary: Save-Dataheader and sets a cookie namedlvisit_mode. In your caching plugin or CDN, configure it to vary the cache by that cookie, or exclude pages for visitors who have it. Check your cache plugin’s documentation for «cache by cookie». -
Why doesn’t it work on iPhones/Safari automatically?
-
Safari does not support the Network Information API and does not send the Save-Data header. Visitors on Safari can still choose lite mode with the manual switch. Add the
[leanvisit_switch]shortcode to a page, widget or footer to show the switch links. -
Will it break my layout?
-
Image, video, embed and font changes are conservative. Skipping scripts and styles is more aggressive and is off by default. Test any exclusions you add by visiting your site with
?leanvisit=lite. -
Can I keep lite mode away from my checkout or login page?
-
Yes. Go to Settings LeanVisit Pages that never get lite mode. Cart, checkout and account pages of WooCommerce and Easy Digital Downloads are protected by default. For any other page, add its path to the exclude list, one per line, for example
/payment/or/members/*. -
What is the LeanVisit item in the admin bar?
-
It is shown to administrators only, on the front of your site. It tells you whether the page you are viewing is in lite or full mode, why, and lets you switch with one click. You can turn it off in the settings.
-
How do I see what lite mode saves on my site?
-
Go to Settings LeanVisit Test your site, enter a page path and click Compare full and lite. The result lists what changed for that page. It compares what the page asks the browser to load; for exact download sizes use your browser’s developer tools (Network tab) with the
?leanvisit=liteand?leanvisit=fulllinks. -
The comparison shows no difference. Why?
-
Either the page has nothing that lite mode changes (try a page with a video or embed), lite mode is turned off, or a cache served the same page to both tests. See the caching notes on the settings page.
-
Does it collect or send visitor data?
-
No. LeanVisit does not track visitors and does not contact any external service. See the Privacy section below.
-
Does it work with page builders and WooCommerce?
-
It works at the level of images, videos, embeds, fonts and enqueued scripts, so it generally works with most themes and builders. Always test your key pages, including the checkout, in lite mode.
Reseñas
No hay reseñas para este plugin.
Colaboradores y desarrolladores
«LeanVisit – Lite Mode for Slow Connections» es un software de código abierto. Las siguientes personas han colaborado con este plugin.
ColaboradoresTraduce «LeanVisit – Lite Mode for Slow Connections» a tu idioma.
¿Interesado en el desarrollo?
Revisa el código , echa un vistazo al repositorio SVN o suscríbete al registro de desarrollo por RSS.
Registro de cambios
1.0.0
- Initial release.
