Title: Code duplication of TOC inline css
Last modified: February 1, 2025

---

# Code duplication of TOC inline css

 *  Resolved [George](https://wordpress.org/support/users/giorgos93/)
 * (@giorgos93)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/code-duplication-of-toc-inline-css/)
 * Hi! I’ve already wrote about the problem a couple years ago: [https://wordpress.org/support/topic/code-duplication-because-of-toc-plugin/](https://wordpress.org/support/topic/code-duplication-because-of-toc-plugin/).
   But unfortunately, it wasn’t fixed.
 * So, I’ll try again: when I put [toc] shortcode in any post, then it’s inline 
   css styling from screen.min.css file becomes duplicated: [https://imgur.com/gKKj6mK](https://imgur.com/gKKj6mK)
 * Please, fix the problem. Thank you.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcode-duplication-of-toc-inline-css%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Support [MM Aurangajeb](https://wordpress.org/support/users/aurangajeb/)
 * (@aurangajeb)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/code-duplication-of-toc-inline-css/#post-18285165)
 * Hi [@giorgos93](https://wordpress.org/support/users/giorgos93/),
 * Thanks for reaching out!
 * Could you please share a screencast along with the steps needed to reproduce 
   this issue? This will help us troubleshoot the problem and assist you further.
   You can use a tool like **Loom** ([https://www.loom.com/screen-recorder](https://www.loom.com/screen-recorder))
   to create and share screen recordings
 * I attempted to identify and reproduce the issue on my testing site using the 
   Table of Contents Plus plugin, but was unable to do so, as shown here: [https://a.supportally.com/v/6mJkvX](https://a.supportally.com/v/6mJkvX).
   Please let me know if I missed any steps in reproducing the issue.
 * I also checked your page at [https://litfan.ru/eto-interesno-znat/luchshie-prilozhenija-dlja-chtenija-knig-top-10/](https://litfan.ru/eto-interesno-znat/luchshie-prilozhenija-dlja-chtenija-knig-top-10/)
   but couldn’t pinpoint the issue. However, I noticed that no CSS files are being
   loaded from the TOC Plus plugin on that page: [https://a.supportally.com/i/4OLJBS](https://a.supportally.com/i/4OLJBS).
 * I’m looking forward to hearing you!
 *  Thread Starter [George](https://wordpress.org/support/users/giorgos93/)
 * (@giorgos93)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/code-duplication-of-toc-inline-css/#post-18287426)
 * Hi, [@aurangajeb](https://wordpress.org/support/users/aurangajeb/) ! Unfortunately,
   I can’t share these steps with you, because there aren’t any. I just put a [toc]
   shortcode in my classic post editor, publish the post, and then the code duplicates.
 * The screenshot, that I’ve showed you, is from Asset Cleanup Pro plugin (for /
   table-of-contents-plus/screen.min.css file). I tried to disable css-minification,
   css-combination, css-inline and critical css options, but it didn’t help – the
   code still duplicates.
 * However, if a page doesn’t have [toc] shortcode, then Asset Cleanup Pro doesn’t
   show a code duplication for /table-of-contents-plus/screen.min.css file. Like
   here, for example: [https://litfan.ru/interesnye-fakty-o-pisatelyah/interesnye-fakty-o-pushkine-dlya-detej/](https://litfan.ru/interesnye-fakty-o-pisatelyah/interesnye-fakty-o-pushkine-dlya-detej/)
 *  Plugin Support [MM Aurangajeb](https://wordpress.org/support/users/aurangajeb/)
 * (@aurangajeb)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/code-duplication-of-toc-inline-css/#post-18293206)
 * Hi [@giorgos93](https://wordpress.org/support/users/giorgos93/),
 * Thank you for your follow-up!
 * I attempted to replicate the issue using the Asset Cleanup free plugin ([https://wordpress.org/plugins/wp-asset-clean-up/](https://wordpress.org/plugins/wp-asset-clean-up/))
   but was unable to do so. I found that only two files are being generated from
   the Table of Contents Plus plugin:
    1. JavaScript file: /wp-content/plugins/table-of-contents-plus/front.min.js
    2. CSS file: /wp-content/plugins/table-of-contents-plus/screen.min.css
 * For reference, here’s a screencast: [https://a.supportally.com/v/5I9uFl](https://a.supportally.com/v/5I9uFl)
 * Please check to ensure that those inline CSS files are not loading from any cache.
   Besides, I believe that this small amount of CSS likely won’t pose a major optimization
   issue for your site or page.
 * Thanks.
 *  Thread Starter [George](https://wordpress.org/support/users/giorgos93/)
 * (@giorgos93)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/code-duplication-of-toc-inline-css/#post-18293266)
 * Hi, I have only two files being generated as well. However, in your screencast
   you don’t have an option to show inline css for screen.min.css file (but I do,
   for some reason). You have it only for front.min.js file.
 * And also I noticed, that the code duplicates only in ‘post’ type. On the main
   page, and on “page” type I don’t have code duplication in the tab. Maybe it’s
   a conflict with another plugin / code, that is loaded only in posts?
 * UPD: I’ve just visited this post: [https://litfan.ru/poleznye-resursy-dlya-pisatelej/ywriter-programma-dlja-pisatelej/](https://litfan.ru/poleznye-resursy-dlya-pisatelej/ywriter-programma-dlja-pisatelej/)
   and there is no code duplication. And here, for example, it does show code duplication:
   [https://litfan.ru/eto-interesno-znat/kak-najti-knigu-po-syuzhetu-ne-znaya-nazvaniya/](https://litfan.ru/eto-interesno-znat/kak-najti-knigu-po-syuzhetu-ne-znaya-nazvaniya/)
 * So I guess, the problem is with some old cache, that wasn’t purged for some reason?
   I did clear cached css/js files both in Asset Cleanup Pro, and my WP Fastest 
   cache plugin many times. But it didn’t fully help, I guess.
 * I tried to search “toc-screen-inline-css” on my web-hosting, and found 22 files
   with it (all of them are index.html files).
    -  This reply was modified 1 year, 4 months ago by [George](https://wordpress.org/support/users/giorgos93/).
 *  Plugin Support [MM Aurangajeb](https://wordpress.org/support/users/aurangajeb/)
 * (@aurangajeb)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/code-duplication-of-toc-inline-css/#post-18304880)
 * Hi [@giorgos93](https://wordpress.org/support/users/giorgos93/) ,
 * Thank you for your update!
 * It seems like the issue might be related to caching. As I mentioned, I tried 
   to replicate this on my local test sites but couldn’t reproduce the problem.
 * I recommend testing on a different site or environment to see if you can replicate
   the issue there, and if you’re able to do so, please let me know the steps you
   took to reproduce it.
 * Additionally, keep in mind that this small amount of duplicated CSS is unlikely
   to significantly impact your site’s optimization or overall performance.
 * For now, I’m marking this topic as resolved.
 * I hope this helps.
 * Thanks!
 *  Thread Starter [George](https://wordpress.org/support/users/giorgos93/)
 * (@giorgos93)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/code-duplication-of-toc-inline-css/#post-18305209)
 * Hi, [@aurangajeb](https://wordpress.org/support/users/aurangajeb/) ,
 * Unfortunately, not only [toc] code is duplicated, but sometimes other codes as
   well. And the duplication happens only on pages, where [toc] shortcode is presented.
   If it’s not presented, then other code doesn’t duplicate.
 * For example, I’ve noticed, that it happens with my “custom-script” js. Here it’s
   duplicated, because [toc] shortcode is presented: [https://litfan.ru/poleznye-resursy-dlya-pisatelej/luchshie-sajty-dlya-publikatsii-knig-top-20/](https://litfan.ru/poleznye-resursy-dlya-pisatelej/luchshie-sajty-dlya-publikatsii-knig-top-20/).
   And here it’s not duplicated, because [toc] shortcode is not presented: [https://litfan.ru/poleznye-resursy-dlya-pisatelej/ywriter-programma-dlja-pisatelej/](https://litfan.ru/poleznye-resursy-dlya-pisatelej/ywriter-programma-dlja-pisatelej/)
 *  Plugin Support [MM Aurangajeb](https://wordpress.org/support/users/aurangajeb/)
 * (@aurangajeb)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/code-duplication-of-toc-inline-css/#post-18321342)
 * Hi [@giorgos93](https://wordpress.org/support/users/giorgos93/),
 * Thank you for your follow-up!
 * This seems like an issue that would be difficult to troubleshoot without being
   able to investigate it in more detail.
 * Would you mind reaching out to us directly via our free **Basic Question** form
   here so we can take a closer look?
   Please go to our Contact Us page at [https://aioseo.com/contact/](https://aioseo.com/contact/)
   and follow these steps:
    1. Click on the “**Complete a Form**” button under the “**I have a basic question**”
       section.
    2. Fill in all the requested details, describe the issue by referring to this topic,
       and click **Submit**. You may use a tool like [https://snipboard.io/](https://snipboard.io/)
       or [https://www.loom.com/screen-recorder](https://www.loom.com/screen-recorder)
       to create and share any related screenshots/screencast if necessary.
 * Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Code duplication of TOC inline css’ is closed to new replies.

 * ![](https://ps.w.org/table-of-contents-plus/assets/icon-256x256.png?rev=1151771)
 * [Table of Contents Plus](https://wordpress.org/plugins/table-of-contents-plus/)
 * [Support Threads](https://wordpress.org/support/plugin/table-of-contents-plus/)
 * [Active Topics](https://wordpress.org/support/plugin/table-of-contents-plus/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/table-of-contents-plus/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/table-of-contents-plus/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [MM Aurangajeb](https://wordpress.org/support/users/aurangajeb/)
 * Last activity: [1 year, 3 months ago](https://wordpress.org/support/topic/code-duplication-of-toc-inline-css/#post-18321342)
 * Status: resolved