Force browser to refresh on new page / hashchange
-
Hey guys,
is there any way to always force the browser to refresh on opening a new page/project page or hash change?The reason I'm asking: I am using a customized navigation bar whose content changes according to each page and scroll position. If I don't refresh every page, the code isn't working; partly due to unloaded elements and – I guess – partly due to the cache.
So this is the website:
http://lukasbazle.de/Please notice that you always have to reload the page to display the content correctly.
As you'll probably see I tried a lot of different ways in the custom head content to fix this, sorry for the mess...
Thanks in advance,
Lukas -
Dear @Lukas-Bazle
there is no official way to refresh the page.
There might be one hack. Use a shortcode on the page. Maybe on a footer page which gets called everywhere.
LayTheme then forces a reload.But also have a closer look here:
http://laytheme.com/documentation.html#custom-javascript
Normally you can also start a Javascript code when the page changes.Hope I could help!
Best!
marius
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