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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T22:01:21+00:00 2026-05-15T22:01:21+00:00

When I use the IE developer tools, some of the DOM elements have attributes

  • 0

When I use the IE developer tools, some of the DOM elements have attributes added that are of the form
jQueryXXXXXXXXX=”YY”
where XXXXX is a fairly long digit string and YY is a usually small integer value.

I don’t see these with the DOM inspector on Safari.

Why and when are these added? Is the data useful to me in any way?

  • 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-15T22:01:22+00:00Added an answer on May 15, 2026 at 10:01 pm

    This is the jQuery expando attribute, it’s a key on the object used to find it’s entry in $.cache. $.cache is used for .data(), event handlers, or anything you want to stick in there, it’s a centralized place to store events (makes firing global events easier/more efficient as well) and one place for cleanup. By carrying only the attribute on the element, it’s not necessary to have a data store on each element which may not clone correctly-cross browser, rather it only maintains this key, and can lookup it’s entry in the $.cache object at any point.

    Let’s take an example:

    domElement[$.expando] //only works in 1.4+, expando was private previously
    

    This will give an “ID” or key of sorts, that key corresponds to the property on the $.cache object that stores this element’s data/events (if it has any data/event handlers). For example if the key was “4”, it would be used internally to access $.cache[4].

    $.cache contains all data, event handlers, etc for all elements that were assigned by jQuery. It’s assigned by incrementing the $.uuid (an internal ever climbing ID jquery assigns and increments any time a new object’s added into $.cache).


    A few extra bits:

    The random nature of the name isn’t all that random, the jQueryXXXXXXXXXXXXXXXXX is just jQuery + the timestamp then jquery was loaded, to give the attribute a unique hopefully non-colliding name.

    Why don’t you see it with .html()?, well because jQuery hides it, it does a regex to strip it out.

    Note: $.expando isn’t exposed in 1.3, only 1.4+.


    Usage:

    Is it useful? Well it can be, for example if you analyze $.cache in your console, and you see you have a memory leak (no .empty() before many .load() calls, leaving event handlers behind for example). You open your console, and do $.cache, you see 500 entries there, let’s say you want to know which object went with 312, then you can select it, like this:

    $("[" + $.expando + "=312]")[0] //DOM element for this entry
    

    As another example, this:

    $("#myElem").data('events') //get events object, equivalent to:
    $.cache[$("#myElem")[0][$.expando]].events
    

    This is one example that’s handy, typically the average jQuery user does’t need to dive into $.cache or how it works, but it is there and available in case you never need to go looking. Just run $.cache in your console, there’s likely a wealth of information about all your handlers that you didn’t know was available 🙂

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

Sidebar

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.