Skip to main content
9 events
when toggle format what by license comment
Dec 2, 2013 at 9:33 answer added actual_kangaroo timeline score: 2
Dec 2, 2013 at 9:18 answer added GWed timeline score: 1
Sep 17, 2013 at 8:23 comment added James Ah, sorry I may not have been as clear as possible in my question. I'm not talking about the original page request. Rather, I'm talking about every time the user updates (adjusts bounds etc) the map, I want new markers to be placed based on the bounds, and the HTML list to update to reflect these changes (the latter reason you suggested). It makes sense to me to return the location data and HTML in one easy API call, but I'm not sure if this is "best" practice based on separation of concerns.
Sep 17, 2013 at 1:07 comment added Ben Lee I ask these questions because if the html is static between page load time and api request time, and not expensive to build, a good solution is to just return it with the initial page load as Ozair recommended. I want to get a better sense of your constraints to better answer the question.
Sep 17, 2013 at 1:06 comment added Ben Lee @James, what is your reasoning for not wanting to pull down the HTML for this list in the original page call? Is the feature only used some of the time and the time to build the list significant (in other words, do you want only want to build the html for the list on-demand to increase general performance)? Or is there some constraint that requires the html to built at the time of the request (e.g. because the list is dynamic and you want it to be most up-to-date, or because it requires some additional input from the user only available on the page)?
Sep 15, 2013 at 9:40 history edited James CC BY-SA 3.0
added 68 characters in body
Sep 15, 2013 at 9:38 comment added James I think you might have misunderstood my question. My page is already rendered, I'm making an API call to get user location data for the map. However I also want to render that location data as a HTML list on the page, without making another API call, and without pulling down the HTML in the original call.
Sep 14, 2013 at 19:31 comment added Ozair Kafray You should get html from the server. The html should request data using ajax requests to the api once its loaded. The api and html can be located within same webroot or different. You sshould think about structuring it as if they come from different urls.
Sep 14, 2013 at 19:10 history asked James CC BY-SA 3.0