Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. General Discussion
  3. Force browser to refresh on new page / hashchange

Force browser to refresh on new page / hashchange

Scheduled Pinned Locked Moved General Discussion
2 Posts 2 Posters 206 Views
  • 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 Offline
    L Offline
    Lukas Bazle
    wrote on last edited by
    #1

    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
    0
    • mariusjopenM Offline
      mariusjopenM Offline
      mariusjopen
      Global Moderator
      wrote on last edited by
      #2

      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
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      Online Users
      A
      alioeh
      Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
      laytheme.com
      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Recent
      • Tags
      • Popular
      • Users
      • Search