How to execute some jQuery or JavaScript code after a redirect has completed -


how can execute jquery/js code jquery/js redirect like...

$(location).attr('href','/target_path'); 

...or...

window.location.href = "/target_path"; 

...has finished loading new page?

specifically, need pass alert message , insert , display (enclosed in html) on new page.

it impossible tell javascript execute code after redirect.

however have different options:

  1. pass string in redirect url , on "ready"
  2. store information in cookie , on "ready"
  3. store data using dom storage (namely sessionstorage) if don't mind smaller browser support

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -