Lay Theme Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Search

    Force browser to refresh on new page / hashchange

    General Discussion
    2
    2
    95
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      Lukas Bazle last edited by

      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

      1 Reply Last reply Reply Quote 0
      • mariusjopen
        mariusjopen Global Moderator last edited by

        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

        www.mariusjopen.world

        1 Reply Last reply Reply Quote 0
        • First post
          Last post

        Before you post

        Use the Search Feature. Maybe there is already a solution to your issue.

        1. Update Lay Theme and all Lay Theme Addons
        2. Disable all Plugins
        3. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code ", click "Save Changes"
        4. Now see if your problem solved itself
        5. Go here, see if your problem is listed here:
        Troubleshooting

        When you post:
        1. Post a link to where the problem is
        2. If the problem is difficult to explain, post screenshots / link to a video to explain it

        Thanks!

        Online Users

        Recent Topics

        • T

          OpenType Feature

        • T

          Split Screen just on front page / subpages without the split?

        • T

          problem when I click on the category filter buttons on mobile

        • G

          z index has different behaviors on different pages

        laytheme.com