i want to remove js files from a layout


which is loading by require or direct src.


<script src="https://abc.abc.ai/prompt.js" src_type="url" />

this file is loading in checkout file but when i try to remove it, doesnt work with this code

  • hello dear, can you install any third-party extension.? Because if you installed a third-party extension that is required. so you can't delete it. Dec 15, 2023 at 10:40
  • Is the mentioned JS file added to the checkout_index_index layout? Can you please tell us where this JS is defined?
    – Msquare
    Dec 15, 2023 at 10:43
  • yes file added to checkout_index_index Dec 15, 2023 at 11:41

1 Answer 1


You can overwrite the layout file in the theme or custom module and add the following code:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        <remove src="https://abc.abc.ai/prompt.js"/>
  • it wont work thanks for your reply Dec 15, 2023 at 11:42
  • Have you run the static content deployment command and checked it?
    – Msquare
    Dec 15, 2023 at 12:37
  • yes brother, already tried. Dec 15, 2023 at 19:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.