Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7688887
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T20:01:55+00:00 2026-05-31T20:01:55+00:00

I am developing a web app and in this app I sometimes load content

  • 0

I am developing a web app and in this app I sometimes load content with the jQuery ajax POST method. This works very good but there is a problem.

After successful POST I load the page content (page) that I get in return.
The problem with this is that when it “arrives” it is not styled and I can see the raw output for a split second and then the styling kicks in.

How can I avoid this “naked” moment?

This is my code:

$.ajax ({
    type: "POST", 
    url: "http://example.com/resource/", 
    data: {image_id: image_id},
    beforeSend: function (html) {
        $('#sidebar').html('Loading');
    },
    success: function (html) {
      $('#sidebar').html(html);
    },
    error: function (html) {
        $('#sidebar').html('Something went wrong!');
    }
});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T20:01:57+00:00Added an answer on May 31, 2026 at 8:01 pm

    Make it hidden until all the data is in place, then show it with the content:

    success: function (html) {
        $('#sidebar').hide().html(html).show();
    },
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is probably a simple question but I am developing a web app in
When developing a web app, in my case a ASP.NET MVC app, but this
We're developing this ASP.NET web app with multiple users on different browsers. One of
I'm developing a web app and currently using sql server 2008 for it. But,
This is the scenario i have: im developing a web app that will list
I am developing a web app base on this guide: http://www.asp.net/data-access/tutorials/declarative-parameters-cs I am able
I'm developing a web app. This is more of a line-of-business app rather than
I'm developing a Web App that uses JavaScript + JQuery on the client side
I'm developing a web app. If I include a jQuery plugin (or the jQuery
I'm developing a web app in asp.net mvc using jquery, the language of application

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.