diff --git a/core/includes/common.inc b/core/includes/common.inc
index 6879def..0583ec9 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -4774,7 +4774,7 @@ function drupal_build_js_cache($files) {
  * Deletes old cached JavaScript files and variables.
  */
 function drupal_clear_js_cache() {
-  variable_del('javascript_parsed');
+  state()->delete('system.javascript_parsed');
   variable_del('drupal_js_cache_files');
   file_scan_directory('public://js', '/.*/', array('callback' => 'drupal_delete_file_if_stale'));
 }
diff --git a/core/modules/locale/lib/Drupal/locale/Tests/LocaleUninstallTest.php b/core/modules/locale/lib/Drupal/locale/Tests/LocaleUninstallTest.php
index 7591f67..c4f8257 100644
--- a/core/modules/locale/lib/Drupal/locale/Tests/LocaleUninstallTest.php
+++ b/core/modules/locale/lib/Drupal/locale/Tests/LocaleUninstallTest.php
@@ -130,7 +130,7 @@ class LocaleUninstallTest extends WebTestBase {
     $this->assertFalse(variable_get('language_negotiation_session_param', FALSE), t('Visit language negotiation method settings cleared.'));
 
     // Check JavaScript parsed.
-    $javascript_parsed_count = count(variable_get('javascript_parsed', array()));
+    $javascript_parsed_count = count(state()->get('system.javascript_parsed') ?: array());
     $this->assertEqual($javascript_parsed_count, 0, t('JavaScript parsed count: %count', array('%count' => $javascript_parsed_count)));
 
     // Check JavaScript translations directory.
diff --git a/core/modules/locale/locale.install b/core/modules/locale/locale.install
index 4970242..e71d356 100644
--- a/core/modules/locale/locale.install
+++ b/core/modules/locale/locale.install
@@ -28,7 +28,7 @@ function locale_uninstall() {
   // Clear variables.
   variable_del('locale_cache_strings');
   variable_del('locale_js_directory');
-  variable_del('javascript_parsed');
+  state()->delete('system.javascript_parsed');
   variable_del('locale_cache_length');
   variable_del('locale_translation_plurals');
   variable_del('locale_translation_javascript');
diff --git a/core/modules/locale/locale.module b/core/modules/locale/locale.module
index a32d47d..87356b1 100644
--- a/core/modules/locale/locale.module
+++ b/core/modules/locale/locale.module
@@ -403,7 +403,7 @@ function locale_js_alter(&$javascript) {
   $language_interface = language(LANGUAGE_TYPE_INTERFACE);
 
   $dir = 'public://' . variable_get('locale_js_directory', 'languages');
-  $parsed = variable_get('javascript_parsed', array());
+  $parsed = state()->get('system.javascript_parsed') ?: array();
   $files = $new_files = FALSE;
 
   foreach ($javascript as $item) {
@@ -436,12 +436,12 @@ function locale_js_alter(&$javascript) {
       unset($parsed['refresh:' . $language_interface->langcode]);
     }
     // Store any changes after refresh was attempted.
-    variable_set('javascript_parsed', $parsed);
+    state()->set('system.javascript_parsed', $parsed);
   }
   // If no refresh was attempted, but we have new source files, we need
   // to store them too. This occurs if current page is in English.
   elseif ($new_files) {
-    variable_set('javascript_parsed', $parsed);
+    state()->set('system.javascript_parsed', $parsed);
   }
 
   // Add the translation JavaScript file to the page.
@@ -804,10 +804,10 @@ function _locale_parse_js_file($filepath) {
  *   The language code for which the file needs to be refreshed.
  *
  * @return
- *   New content of the 'javascript_parsed' variable.
+ *   New content of the 'system.javascript_parsed' variable.
  */
 function _locale_invalidate_js($langcode = NULL) {
-  $parsed = variable_get('javascript_parsed', array());
+  $parsed = state()->get('system.javascript_parsed') ?: array();
 
   if (empty($langcode)) {
     // Invalidate all languages.
@@ -824,7 +824,7 @@ function _locale_invalidate_js($langcode = NULL) {
     $parsed['refresh:' . $langcode] = 'waiting';
   }
 
-  variable_set('javascript_parsed', $parsed);
+  state()->set('system.javascript_parsed', $parsed);
   return $parsed;
 }
 
diff --git a/core/modules/system/system.install b/core/modules/system/system.install
index 05459d0..cf8477c 100644
--- a/core/modules/system/system.install
+++ b/core/modules/system/system.install
@@ -2102,6 +2102,15 @@ function system_update_8022() {
 }
 
 /**
+ * Cleans up javascript_parsed variable.
+ *
+ * @ingroup system_upgrade
+ */
+function system_update_8023() {
+  update_variable_del('javascript_parsed');
+}
+
+/**
  * @} End of "defgroup updates-7.x-to-8.x".
  * The next series of updates should start at 9000.
  */
