The Shifting Index
Google Docs includes a powerful Table of Contents (TOC) feature that automatically generates an index based on the Heading styles used throughout your document. However, by default, Docs does not continuously live-update this table. If you add a new “Heading 2” section to page 5, the TOC on page 1 will not automatically reflect this change until you manually refresh it. Conversely, if you are using a third-party add-on or a specific Apps Script designed to force constant TOC refreshes, it can cause the document to stutter or jump every time you type a heading, disrupting your writing flow.
Managing TOC Refreshes
To prevent performance issues and stop Google Docs from automatically updating your table of contents via background scripts (or to understand why it normally doesn’t), you must manage the refresh triggers.
Native Google Docs does not automatically update the Table of Contents in real-time; you must click the circular arrow “Refresh” icon on the TOC itself. If your TOC is updating automatically every time you type, you have an active extension or script causing it. Click on Extensions in the top menu bar. Look at the list of installed add-ons. If you see one related to “Dynamic TOC” or “Auto Table of Contents,” hover over it and see if there is an option to disable the live sync. If you suspect a script is running, click Extensions > Apps Script. Look for an `onEdit(e)` function in the code editor that specifically targets the TOC elements. You can disable this by commenting out the code (adding `//` before the lines) and saving the script. This returns control of the TOC refresh to your manual clicks.