trivelo
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
Resolved, seems I forgot to add https:// on the define(‘ADVMO_CLOUDFLARE_R2_DOMAIN’
Hi Jose,
It seems that FlyingPress and FlyingCDN are not compatible with this plugin, due that FlyingCDN doesn’t generate a separate cache for mobile devices. I resolved this by adding to header below Javascript. Hope it help someone else who uses same.
<script type="text/javascript">
// Run the redirection check as soon as possible
(function() {
// Simple mobile detection
var isMobile = window.innerWidth <= 768 || /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
if (isMobile) {
// Check if 'scfm-mobile=1' is already in the URL
if (window.location.href.indexOf('scfm-mobile=1') === -1) {
// Append '?scfm-mobile=1' to the current URL
var newUrl = window.location.href + (window.location.href.indexOf('?') === -1 ? '?' : '&') + 'scfm-mobile=1';
// Redirect before loading other resources
window.location.replace(newUrl);
}
}
})();
</script>All needed to be done afterwards is to ensure that they cache that query string.
Seems it is issue with FlyingPress plugin, their team is working to resolve it.
Viewing 3 replies - 1 through 3 (of 3 total)