I want to make a website in cakephp framework.but the important thing is I have to develop whole website in ajax(No page refresh).
Although I have good experience of open sources magento,drupal etc.but I am new for the cakephp.I want to know ,what should I have take care for improving the efficiency of the website.
In My layout there is header section,right panel and footer section.
When a user clicks on header section right panel and some of middle content will reload. I want to know I should send a sing Ajax request or multiple Ajax request.
Please guide me or give some outline for this.
I want to make a website in cakephp framework.but the important thing is I
Share
There is nothing special about ajax in CakePHP but you can define another layout and view for ajax responses than for a regular request.
If you want to return json or html is up to you. See this section of the book for json responses.
If you want to update two sections in one ajax call I think you’ll have to return json that will contain two values you can access to make a difference between them and your server side code has to be written in a way that it knows that it should return section1 and section2. How you do that is up to you, there several ways.