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 6720125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:10:30+00:00 2026-05-26T09:10:30+00:00

I’m trying to display an overlay that says page loading…please wait while data is

  • 0

I’m trying to display an overlay that says “page loading…please wait” while data is being retrived from a sql server. I’m hoping to use the BlockUI plugin for this but anything will do. I have an ASP.NET page using a site.master. The plugin works but no matter what I tried, it only appears AFTER the page was fully loaded.

The bulk of the waiting is down to work done in the Global.asax file. In the Session_Start section, I have a function that returns data to populate dropdown menus on my page. This takes about 20 seconds to complete.

So, what do I need to do in order to view the overlay BEFORE the page is fully loaded?
Thanks for any help or advice.

  • 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-26T09:10:31+00:00Added an answer on May 26, 2026 at 9:10 am

    For loading pages, plugins won’t do the trick

    If you want your page to be blocked until it’s loaded, content blocker element should be part of your page and not generated by any plugin that always run after your page has loaded. At some point in time or another.

    <body>
       ...
       <!-- make it last -->
       <div id="blocker">
           <div>Loading...</div>
       </div>
    </body>
    

    And have CSS do the rest

    #blocker
    {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: .5;
        background-color: #000;
        z-index: 1000;
    }
        #blocker div
        {
            position: absolute;
            top: 50%;
            left: 50%;
            width: 5em;
            height: 2em;
            margin: -1em 0 0 -2.5em;
            color: #fff;
            font-weight: bold;
        }
    

    And Javascript that clears blocking:

    $(function(){
        $("#blocker").hide();
    });
    

    This is a working example using the code above. It removes blocker on timeout, because it’s such a simple document.

    Important notice

    But maybe you’re not understanding this the right way. Maybe you would like to block existing page when it posts back to server, because that’s a different story. In this case your plugins should suffice and should run on unload window event and display blocker element. This would block existing page while it posts back its data and before browser starts receiving new content (which can be blocked with previously shown technique).

    It seems the problem is browser waiting for server response

    It’s hard to tell since you can’t pin point it yourself. But suppose the problem is that browser is waiting for server to respond. And as you mention session loading is slow. Two things:

    1. Optimise DB call to get those menu data quicker (if it really takes that long – have you checked with profiler?)
    2. Have a static default HTML page that displays the Loading content and executes a redirect:
      • using a META refresh tag – safer for old browsers and those without javascript
      • javascript – better for modern pages and especially because your page is using Javascript (__doPostback anyone)

    It seems that your best bet is the combination of both. But go one step at a time and see if it’s better.

    One more thing. I know that waiting for the first response (application start) takes some time. It does so on many pages. But people usually don’t really bother since users can’t do no harm with data because it’s still not displayed. It’s much worse when your response times are long when using the page, because users tend to click the same button several times (when creating/updating data for instance). That is much more harmful.

    And maybe you’re confusing the Asp.net application start-up with your session loading. When you application first starts it takes much longer for server to respond, because it has to compile your application and start it up. This can take considerable time. There are several workarounds for that that include changes to application recycling times and separate heartbeat services that make tiny requests to application just to keep it alive during longer time of inactivity.

    You should also take into account that your in development page is running on a desktop machine. You should know whether your server is faster.

    So maybe it’s not the session creation but rather application start-up. You should tell the difference by opening a page in a browser and waiting for it to complete, then close the browser and opening it again (so new session will get created) and access your application. If it loads faster then it’s not your session’s fault but rather application start-up when .net framework has to compile your application.

    Define the problem first then start mitigation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I used javascript for loading a picture on my website depending on which small
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
i want to parse a xhtml file and display in UITableView. what is the

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.