Ability to disable AMP client / extension (no-op mode)
Description
It would be very useful to have a way to disable the AMP client / extension, for example:
- when the AMP service is temporarily unavailable
- for performance testing and benchmarking (A/B with and without AMP)
- as a safety fallback in production
The key requirement is that disabling AMP must not break the application.
Expected behavior when disabled
- The extension can be turned off via configuration or flag (e.g.
enabled: false)
- It should also be possible to disable it directly from the administration interface (e.g. via Service Connection with ony one option – enabled)
- Latte macros and all AMP-related calls remain available, so templates and application code do not fail
- When disabled, the extension should behave as a no-op:
- macros return no output
- no buffer traversal
- no JS banners (optional)
- no network calls
- Runtime overhead should be minimal (ideally close to zero)
In other words:
AMP is still “present” from the application’s point of view, but it does nothing.
Benefits
- Safe runtime disabling
- Easy performance comparison (AMP on vs off)
- Graceful degradation without touching templates or application logic
Possible implementation ideas (non-binding)
enabled flag on the extension level
- Internal no-op mode for Latte macros
- Null / dummy client used when disabled
Ability to disable AMP client / extension (no-op mode)
Description
It would be very useful to have a way to disable the AMP client / extension, for example:
The key requirement is that disabling AMP must not break the application.
Expected behavior when disabled
enabled: false)In other words:
Benefits
Possible implementation ideas (non-binding)
enabledflag on the extension level