You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am loading a script inside the body of a page with <Script src="/scripts/contact.js" />. I have contact.js in static > scripts with a simple console.log("Hello").
When I navigate to the page containing the <Script>, it shows "Hello" in the console. I then click on a link to go to another page, and then on the back button to go back to the page that contains the <Script>. The script doesn't run again. I can't see anything in the console.
Is this expected? Is there a way to get the script to run after navigating into a page with the browser back button?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am loading a script inside the body of a page with
<Script src="/scripts/contact.js" />
. I havecontact.js
instatic > scripts
with a simpleconsole.log("Hello")
.When I navigate to the page containing the
<Script>
, it shows "Hello" in the console. I then click on a link to go to another page, and then on the back button to go back to the page that contains the<Script>
. The script doesn't run again. I can't see anything in the console.Is this expected? Is there a way to get the script to run after navigating into a page with the browser back button?
Beta Was this translation helpful? Give feedback.
All reactions