views:

16

answers:

1

My colleagues have create a website and there is a webpage which contains a Tab. He Implement the tab with the following method:

1.Load all content of the page
2.Use javascript to display those group content as block and organize them into tabs.
3.when user click one tab, then acitve it, and hide all other tabs.

And these functions works very well, but the performance is bad:
1.Load all contents cost lots of time
2.It will show all content at first, and then shrink to a tab control. When the user see this, it might think this is a bug of our system.

And These code are ready to deploy, is there any quick fix to handle these problems ?
Thanks in advance !

A: 

My only Quick suggestion would be to load everything at start into the dom... then do a display:none on the tab sections that aren't showing. This way the dom is constructed, and the show is theo nly thing that needs to be done. Do all the loading at the start, and perhaps put up a please wait message.

Failing that, put up a please wait whenever they select a tab, statistics show that users don't feel the performance is bad if they get a please wait message.

Zoidberg
load everything at start into the dom, can you explain this ?
MemoryLeak
Well, load up all your content, put it all into the DOM (divs) and then hide the divs of the tabs that aren't showing. All I am suggesting is you put all of your load time at the beginning, put up a wait message, and go from there. THat will make the users ignore any bad performance until you can properly map out a strategy to get it running faster
Zoidberg