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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T23:02:14+00:00 2026-05-21T23:02:14+00:00

An interesting problem: I want to have a reproducible way to identify elements on

  • 0

An interesting problem:

I want to have a reproducible way to identify elements on a page such that I can store this ID and be able to id the element on another client, without having to store the full HTML. It needs, also, to be robust to insertion / removal of nodes in the DOM (so a simple numbering convention will not work).

So far, Im thinking:
In certain cases we will have a unique id which i can use, falling back to offset from the first parent that does have an id attached, else parent that has a class attached. Does this make sense? Am I missing a trick?

Kind of related: What information about a DOM element would allow JavaScript to identify it (somewhat) uniquely? (e.g. when it doesn't have `id`)

  • 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-21T23:02:15+00:00Added an answer on May 21, 2026 at 11:02 pm

    If I understand your question, you want to know a robust XPath () for any element
    An ID would be a Base64 version, or a hash version of the XPath of the element

    That question sounds a bit weird to me, no offense. If you don’t functionnally or semantically define each element in the DOM, what identify it is precisely its position in the DOM, or if you want the relationship it has with other element in the DOM…

    The fifth row of a table could have a functional definition (depending on the application, eg in a mail box app, its something like ), but it can also be the fifth element of a table… The information about the element is made by the intent of the developer, not by a magic formula describing every html element ever made

    Correct me If I misunderstood your point

    Cheers

    Grooveek

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

Sidebar

Related Questions

I have an interesting problem that i can't seem to figure out. I am
I have this problem. I have a graph of n nodes that I want
I have an interesting problem. I'd like to create a generic class that can
He're an interesting problem that looks for the most Pythonic solution. Suppose I have
there's this interesting problem i can not solve myself. I will be very glad,
I have an interesting problem, that i am sure has a simple answer, but
Here's an interesting problem that I have just come across. It is possible to
I have an interesting problem here. I have a MySql database table that has
I have an interesting problem.. I have a Form that launches another Form (2)
I have an interesting problem to solve here that may require some creative direction.

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.