I want to update the header menu cart count when someone click the add to cart button

Topic summary

A developer is working with Shopify’s Dawn theme and needs help implementing AJAX functionality to update the cart count in the header menu when users click the add-to-cart button, without triggering a page reload.

Current situation:

  • The user has replaced the default header.liquid file with custom code
  • They’ve shared their header.liquid code snippet for review

Technical details:

  • The code snippet appears corrupted or reversed in the post (characters are backwards)
  • The implementation involves cart count display elements and cart icon/link structure

Status: The question remains unanswered with no solutions or responses provided yet. The developer is seeking guidance on the proper AJAX implementation for real-time cart count updates.

Summarized with AI on November 13. AI used: claude-sonnet-4-5-20250929.

I have replace all the code from the header.liquid file and put my custom code I want to update the cart count using AJAX without page lode below I have share the header.liquid file code help me to solve the issue I am using DAWN theme

cart {{ cart.item_count }}