javascript - how to execute the JS before rendering the HTML page? -


i writing html page,in fire ajax request , check response receive , depending upon response,i decide whether render page or not.at present depending upon request,i redirecting url html page gets rendered.

you can't pre-html effort. logic have server side. create 'blank' page redirects content or shows content. loading elements tho needed act on logic (js / html code, etc;)

workflow be:

  1. load blank looking page js logic
  2. identify if should loading content or denying further access

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -