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:
- load blank looking page js logic
- identify if should loading content or denying further access
Comments
Post a Comment