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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T07:42:16+00:00 2026-06-15T07:42:16+00:00

I have a bunch of UI elements, which for simplicity’s sake we can consider

  • 0

I have a bunch of UI elements, which for simplicity’s sake we can consider them to be li elements.

A visitor to a web page can insert, delete or reorder these li elements and every time the user does it, the updated order should be persisted. A linked list would be the best solution in this case, but for one issue.

Let us suppose two users A and B have the web page containing the list open. The list looks like this 1 -> 2 -> 3 -> 4 -> 5 -> 6 -> 7 -> 8.

User A reorders it to 1 -> 4 -> 3 -> 2 -> 5 -> 6 -> 7 -> 8. This change is successfully persisted by AJAX calls updating the references for 1, 4, 3, 2 and 5.

In the 2-3 seconds that it takes for this call to travel to the backend, persist and update on User B’s screen – User B updates the list that appears on his web page to 5 -> 2 -> 3 -> 4 -> 1 -> 6 -> 7 -> 8. The wrong AJAX calls are generated and they ultimately mess up the ordering.

Would love some suggestions on how best to solve this issue.

  • 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-15T07:42:17+00:00Added an answer on June 15, 2026 at 7:42 am

    Have a UUID that is updated whenever the order changes. Send the UUID to the client when they want to reorder, and verify that the UUID has not changed on submit. If it has, either reject the reorder or notify the user and allow them to take the appropriate action.

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

Sidebar

Related Questions

I have a bunch of < li > elements which I want to animate
For example, I have a bunch of elements inside a #dialogbox div, can I
So I have a bunch of paragraph elements which are dynamically populated from a
I have a page which contain a bunch of text area generated by a
I have a bunch of inline-block elements over several lines which I'd like to
I have a bunch of <div> elements, each of which has a name .
I have a gallery page which displays a whole bunch of photo thumbnails (>50)
I have a bunch of LI elements for which I need to change the
I have a bunch of select elements in a form with which I am
I have a container in which I'm putting a bunch of elements, and my

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.