Site automatically refreshes in certain browsers when switching between desktop and mobile styles
-
In Chrome (Mac/PC/iOS) and Safari (iOS), some pages will automatically refresh when switching between desktop/mobile styles (video example). The automatic refreshing doesn't seem to happen in Firefox (Mac).
I think it has to do with custom phone layouts? For example, this page does not have a phone layout setup, and does not refresh when switching between mobile/desktop CSS.
Wondering if this is a technical necessity of the phone layout feature, maybe to render new HTML? Or a bug? I tried searching the documentation for info on automatic page refreshing but didn't see anything.
If there's any other info I can provide please let me know. Appreciate any help!
Thank you.
-
Dear @alexbruno
the page should not refresh on resize.
Do you use any plugins or custom code?Best!
Marius
-
Hi @mariusjopen
Thank you for the clarification.
I've tried removing all custom css + html, deactivating all WP plugins, deactivating Chrome extensions, and clearing the cache, but the auto-refresh still happens on some pages.
Still trying to narrow down what is making the refresh happen on these particular pages.
///
Some details about my install:
- LayTheme version: 2.7.6
- Wordpress version: 5.2.1
- Apache Version: 2.4.39
- PHP Version: 7.2.13
- MySQL Version: 10.2.12-MariaDB-log
-
When I click on the URL for "work" in my primary navigation, this is what network inspector shows:
When I resize the page and it auto-refreshes, this is what it shows:
So maybe there's an extra redirect being added in here that's causing the issue... ?
Sorry for multiple posts, just trying to keep track of the problem.
-
Dear @alexbruno
ok. Thank you for going so deep in it to explain the issue.We will have a look and see what is going on.
:-)
All the best and thank you for using LayTheme.
Marius
-
Hey,
When you use a shortcode in your website, your page will refresh.
This is to make shortcodes work properly with lay theme.I see you use a shortcode as your footer menu, you could try to make the footer not use a shortcode.
-
Armin, thank you very much! This is indeed what is happening.
The presence of a shortcode module (even with my shortcode plugin deactivated) will cause the page to refresh upon resizing the browser window to mobile/desktop width.
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it