Imagine that you have several links on a page. When you clicked, a div gets updated via AJAX. The updated div includes data from the database.
According to this scenario, every time a link is clicked, the date is grabbed from the database and injected into the div.
Would you…
- support this scenario or…
- would load each link’s content in several hidden divs and display relevant div on each link click. This way the ajax call is only called once..
depends… is the content going to change? If so… Ajax every time. If not? Ajax once(or zero times if posible)