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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T00:36:59+00:00 2026-06-11T00:36:59+00:00

I work for a large website (5+ million unique hits monthly, approx 55-60 million

  • 0

I work for a large website (5+ million unique hits monthly, approx 55-60 million pages views/impressions).

We are currently updating our usability (tabindex, labels, etc).

I’m using a css class and jQuery (see code below) to change the cursor type to “progress” on form submit (and on ajax related partial page refresh/update, etc) so that the user instantly knows “something” is happening, via the class name “loadWait.

 //css class
   body.wait *, body.wait {
    cursor:progress !important;
   }

   //jQuery
   $(document).ready(function() { 
      $('.loadWait').click(function(){
         progerssCursor();
      });
   });
   function progerssCursor(){
    $('body').addClass('wait');
   }
   function removeProgerssCursor(){
    $('body').removeClass('wait');
   }

   //example html   
   <input type="sumbit" class="loadWait" />
   <a href="..." class="loadWait" />

   //in ajax requests by calling functions "progressCursor()" and 
"removeProgressCursor" at the appropriate time/place

So the questions are:

  1. Are there any known “side effects” of this kind of approach? (Have googled extensively and couldn’t find anything which leads me to believe not).

  2. We are discussing if we should also attach class=”loadWait” to all of our links (obviously not the ones with target=”_blank” as we don’t want the cursor to change in this situation). What are your thoughts? Our reasoning being that at times, for whatever reason (high server load, slow internet connection, etc), there can be the odd lag of a couple of seconds between user “link clicks” and the actual page starting to render, this way the user would instantly know that “something” is happening (we are aware that the loading icon in the tab is there, but it is often missed by the user).
    What are your thoughts? Is it an over kill doing this for all of our links? (not talking about man hours here).

  3. Does anyone know what kind of extra page load time (if any) this will add? (how does $(‘.loadWait’).click(function(){… work? Does jQuery inspect the whole DOM on page load for the “click” event, or on a “click by click” basis checking for a matching class name?).

  4. Any other thoughts on any of this?

NOTE: This code has been tested by us on IE6-9, FF3.6, FF11, FF12, Opera, Safari (windows), Chrome, etc with no known/apparent bugs/issues.

  • 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-06-11T00:37:01+00:00Added an answer on June 11, 2026 at 12:37 am

    I’ll go ahead and answer your questions by #:

    1. There are no direct side effects to doing what you are doing. There are some scenarios that you are helpless to though, for instance a user with JavaScript disabled. That being said I know that Chrome (at least the newer versions) will change the cursor to a loading icon automatically on page load so this extra piece of JavaScript will not be necessary for the Chrome browser. However, with a high traffic site running JavaScript should not be the worry (see #2), unless that JS is ajax oriented.
    2. If you’re trying to add a custom loading indicator on link clicks then adding a click handler to each link will be the appropriate way. Nice thing about JavaScript is that it’s purely client side. So despite how long it takes a page to load, the second a user clicks a “loadWait” link it will fire the JavaScript first and then wait for the page to load. Therefore based on the server load you’re describing this will have no effect on the action of actually clicking a link since your piece is all client side.
    3. As long as your JavaScript is at the bottom of the body (which it should be) the page load time will be unaffected in the sense that all the HTML elements will have already loaded before any JavaScript is executed. However, if you’re truly concerned the click event isn’t a very taxing jQuery function but just like any jQuery function, if used in excess can cause a minimal delay. I doubt this will be an issue however, so I’d say, don’t worry about it, just make sure your JS is at the bottom of the page.
    4. Briefly jumping back to #1: make sure you take a look at all the browsers innate functionality so you can determine which browsers (like Chrome) already offer this functionality.

    Best of luck to you, hope this helps!

    EDIT: One more thing I forgot to mention. If you have any dynammically loading JavaScript on the page the .click event will not register to any links within that dynamic JavaScript. That is assuming that your code snippet is firing in $(document).ready. If you were to move it to $(window).load that would be more appropriate. However, an even better solution is to utilize jQuery’s .on function (used to be .live). The on function will allow for dynamic JavaScript to also be bound, but beware: if there is a lot of dynamic JavaScript on a regular basis this could hinder the performance of that JavaScript.

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

Sidebar

Related Questions

I work for a large website. Our marketing department asks us to add ever
I'm using Mathematica to work with a large array of website files, which I've
So I'm writing a test framework for a large website, and am currently working
please read all of this before commenting. I'm currently working on a large website
I currently work for a large company and I design for their high-traffic ecommerce
Most HTML in a large website is duplicated across pages (the header, footer, navigation
I'm developing (.NET MVC) a large website which has the following specifications: Database pages
I am transferring a large static website of 500+ pages to a Joomla installation
I am crawling our large website(s) with nutch and then indexing with solr and
I am working on a large website (1600+ pages) that needs upgrading to pass

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.