I have a simple web application with a number of tabs. The tab content’s gets loaded using AJAX when the user clicks on the tab. However, it takes < 1s to load some of the tabs so from the user’s point of view, there is no content at first (just empty inputs that will be populated via AJAX)
$('#my-tab').on('click', function() {
// load content
});
$('#another-tab').on('click', function() {
// load some different content
});
To solve the problem I can:
1) Use some AJAX spinner to inform the user that there is content but it’s about to be loaded
2) Use HTML forms instead so content is loaded without AJAX
What is the correct/best/common solution? Many thanks.
This is a good article that summaries what you ask for.
Based on an approximate time it takes to load the content for your average user, you can apply this practice :