title: Jquery only loading after the page is refreshed?
body: <p>I have built a web application, which has few pages and on the home page needs to retrieve the data from API and it works fine but suppose when I click on another page and then from that I click  back on the home page it doesn't load that get API request until I refresh the page!i tried pagecreate,load,ready but it doesn't work!</p>
  
  <p>you can check the website <a href="https://woke-agency.com" rel="nofollow noreferrer">https://woke-agency.com</a>
  Here's my code now</p>
  
  <pre><code>$(document.body).ready(()=&gt;{
  const LoadWorks = () =&gt; {
      //api here
  }
  
  LoadWorks("/api/works/")
  })
  </code></pre>