diff --git a/typo3/sysext/frontend/Classes/Http/RequestHandler.php b/typo3/sysext/frontend/Classes/Http/RequestHandler.php
index 5e9a8a87f7452b2ec5574a9cf9fd886eabe49c8b..f16cefd9ae8c12bb1af65f1d01406b7cabe26d6c 100644
--- a/typo3/sysext/frontend/Classes/Http/RequestHandler.php
+++ b/typo3/sysext/frontend/Classes/Http/RequestHandler.php
@@ -715,13 +715,16 @@ class RequestHandler implements RequestHandlerInterface
             $controller->cObj
         );
 
-        $controller->INTincScript_loadJSCode();
-
         // Javascript inline code
         $inlineJS = $controller->cObj->cObjGet($controller->pSetup['jsInline.'] ?? null, 'jsInline.');
         // Javascript inline code for Footer
         $inlineFooterJs = $controller->cObj->cObjGet($controller->pSetup['jsFooterInline.'] ?? null, 'jsFooterInline.');
         $compressJs = (bool)($controller->config['config']['compressJs'] ?? false);
+
+        // Needs to be called after call cObjGet() calls in order to get all headerData and footerData and replacements
+        // see #100216
+        $controller->INTincScript_loadJSCode();
+
         if (($controller->config['config']['removeDefaultJS'] ?? '') === 'external') {
             /*
              * This keeps inlineJS from *_INT Objects from being moved to external files.
diff --git a/typo3/sysext/frontend/Tests/Functional/Controller/DataSet/LiveDefaultPages.csv b/typo3/sysext/frontend/Tests/Functional/Controller/DataSet/LiveDefaultPages.csv
new file mode 100644
index 0000000000000000000000000000000000000000..ea62798ff0fa5cd90469d7bfb40e21795318c4d9
--- /dev/null
+++ b/typo3/sysext/frontend/Tests/Functional/Controller/DataSet/LiveDefaultPages.csv
@@ -0,0 +1,11 @@
+"pages"
+,"uid","pid","sorting","deleted","sys_language_uid","l10n_parent","t3_origuid","t3ver_wsid","t3ver_state","t3ver_stage","t3ver_oid","title","slug","l10n_state"
+,1,0,256,0,0,0,0,0,0,0,0,"Pre page without template","","{}"
+,2,1,256,0,0,0,0,0,0,0,0,"Root page having template with root flag set by tests","/","{}"
+,88,2,256,0,0,0,0,0,0,0,0,"Sub page 1","/subpage1/","{}"
+,89,88,256,0,0,0,0,0,0,0,0,"Sub sub page 1","/subpage1/sub1/","{}"
+,98,2,256,0,0,0,0,0,0,0,0,"Sub page 2 having template with root flag","/subpage2/","{}"
+,99,98,256,0,0,0,0,0,0,0,0,"Sub sub page 2","/subpage2/sub2/","{}"
+"sys_template"
+,"uid","pid","sorting","deleted","hidden","starttime","endtime","t3_origuid","root","clear","include_static_file","constants","config","basedOn","includeStaticAfterBasedOn","static_file_mode"
+,1,98,256,0,0,0,0,0,1,0,"","","","",0,0
diff --git a/typo3/sysext/frontend/Tests/Functional/Controller/Fixtures/jsInline.typoscript b/typo3/sysext/frontend/Tests/Functional/Controller/Fixtures/jsInline.typoscript
new file mode 100644
index 0000000000000000000000000000000000000000..bb119250f1cebb10c494f59b842f26027119e7c3
--- /dev/null
+++ b/typo3/sysext/frontend/Tests/Functional/Controller/Fixtures/jsInline.typoscript
@@ -0,0 +1,10 @@
+page = PAGE
+page {
+  jsInline {
+    10 = COA_INT
+    10 {
+      10 = TEXT
+      10.value = alert(yes);
+    }
+  }
+}
diff --git a/typo3/sysext/frontend/Tests/Functional/Controller/TypoScriptFrontendControllerWithFrontendTest.php b/typo3/sysext/frontend/Tests/Functional/Controller/TypoScriptFrontendControllerWithFrontendTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..6249a53b82ed7e477117acdddfb1ae1f32938f83
--- /dev/null
+++ b/typo3/sysext/frontend/Tests/Functional/Controller/TypoScriptFrontendControllerWithFrontendTest.php
@@ -0,0 +1,58 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+namespace TYPO3\CMS\Frontend\Tests\Functional\Controller;
+
+use TYPO3\CMS\Core\Tests\Functional\SiteHandling\SiteBasedTestTrait;
+use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\InternalRequest;
+use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;
+
+class TypoScriptFrontendControllerWithFrontendTest extends FunctionalTestCase
+{
+    use SiteBasedTestTrait;
+
+    protected const LANGUAGE_PRESETS = [
+        'EN' => ['id' => 0, 'title' => 'English', 'locale' => 'en_US.UTF8'],
+    ];
+
+    /**
+     * @test
+     */
+    public function jsIncludesWithUserIntIsRendered(): void
+    {
+        $this->importCSVDataSet(__DIR__ . '/DataSet/LiveDefaultPages.csv');
+        $this->setUpFrontendRootPage(
+            2,
+            [
+                'typo3/sysext/frontend/Tests/Functional/Controller/Fixtures/jsInline.typoscript',
+            ]
+        );
+        $this->writeSiteConfiguration(
+            'test',
+            $this->buildSiteConfiguration(2, 'https://website.local/'),
+            [$this->buildDefaultLanguageConfiguration('EN', '/en/')]
+        );
+
+        $response = $this->executeFrontendSubRequest(
+            (new InternalRequest('https://website.local/en/'))->withPageId(2)
+        );
+
+        $body = (string)$response->getBody();
+        self::assertStringContainsString('/*TS_inlineJSint*/
+alert(yes);', $body);
+    }
+}