0

I am trying to speed up my website. So at the moment, controller fetches data from database, do calculation on data and display on view. what I plan to do is, controller/action fetches half the data and display to the view. Than come back to different controller/action and do calculation on data and display data on screen.

But what I want to know is once I fetch data and display on screen, how do I go back to controller automatically(without any click by user) to do calculations on same data.

Ishita
  • 87
  • 1
  • 2
  • 10
  • you may want to check this http://stackoverflow.com/questions/1873735/display-the-result-on-the-webpage-as-soon-as-the-data-is-available-at-server – tssutha Jul 27 '16 at 12:27
  • I have experimented with this approach in pyramid recently. It does not work well. I would use Ajax method as stated in answer below. – fat fantasma Jul 27 '16 at 14:52

1 Answers1

2

Why don't you use ajax function , post data to the server and when proccess to the server is done display the result to the html page

Dimitris Kougioumtzis
  • 2,339
  • 1
  • 25
  • 36