I am using jQuery UI tabbed content as well as datatables to render the information from our database. This is all on one page and since each table is just hidden on the page there’s a lot of queries to the database that are not needed.
The site uses zend framework and this page loads with one controller and view file. I was thinking of using partials but can they be loaded only after a tab is clicked? If so how? Or is there a better method to optimize this page of tabbed content?
Thanks
You can make the tab content loaded after user clicks on tab – in fact there is a simle example in jqueryui.com demos section.
On the server side, you can divide tabs views into separate actions (just to clarify – I’m thinking here not about just partials, but separate action and view template for each tab), switch the layout off and render only the template:
And then in the view, the code for tabs can look similar to this: