i've got setup of html, php & jquery. steps want user take follows:
- click button
- modal appears dynamic data (taken button markup, parent div etc.)
- user submits modal & close
i have 2 options. to:
- generate html prior user clicking button. php & hide & manipulate jquery once clicked.
- request the html on click via ajax using api & again manipulate jquery.
my question is. 2 options best performance?
reading through , documenting logic. i'd point 1. best i'm not requesting large amount of data through api every time?
can see advantages number two? apart not requesting data server side on page load?
thanks.
i think main question here "how dynamic information used produce html ?".
if there isn't high probability information used produce html change @ time, should better off 1st option, since therefore avoiding additional request server.
if information used produce html change @ time, reason use 2nd approach.
Comments
Post a Comment