{"id":1633,"date":"2020-06-07T22:28:07","date_gmt":"2020-06-07T14:28:07","guid":{"rendered":"https:\/\/www.wesbytes.com\/guide\/?post_type=kb&#038;p=1633"},"modified":"2026-01-12T13:51:46","modified_gmt":"2026-01-12T05:51:46","slug":"how-can-i-ignore-the-specific-javascripts","status":"publish","type":"kb","link":"https:\/\/www.servergigabit.com\/guide\/kb\/how-can-i-ignore-the-specific-javascripts","title":{"rendered":"How can I ignore the specific JavaScripts?"},"content":{"rendered":"<h3><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone\" src=\"https:\/\/blog.nashtechglobal.com\/wp-content\/uploads\/2023\/09\/R.jpeg\" alt=\"specific JavaScripts\" width=\"1280\" height=\"720\" \/><\/h3>\n<h3><strong>How can I ignore the specific JavaScripts?<\/strong><\/h3>\n<p>You can have<a href=\"https:\/\/www.cloudflare.com\/press\/press-releases\/2011\/cloudflare-rocket-loader-delivers-app-like-speeds-to-any-website\/\" rel=\"nofollow noopener\" target=\"_blank\"> Rocket Loader<\/a> ignore individual scripts by adding the data-cfasync=\u201dfalse\u201d attribute to the relevant script tag, for example:<\/p>\n<p>&lt;script\u00a0<strong>data-cfasync=\u201dfalse\u201d<\/strong>\u00a0src=\u201d\/javascript.js\u201d&gt;&lt;\/script&gt;<\/p>\n<p>It will still optimise the loading of all other scripts on the page.<\/p>\n<p><strong>Notes:<br \/>\n<\/strong><\/p>\n<ol>\n<li>Adding this attribute within specific JavaScript will not work if you wish to exclude the script.<\/li>\n<li>If the script you want\u00a0 to ignore has dependency on other JavaScript(s) on the page, those depedencies must also have the data-cfasync=\u201dfalse\u201d attribute added.<\/li>\n<li>The \u2018data-cfasync\u2019 attribute must be add before the \u2018src\u2019 attribute.<\/li>\n<li>Rocket Loader will recognise the tag when either single or double quotes are place around the attribute value.<\/li>\n<\/ol>\n<p><strong>Alternative:<\/strong><\/p>\n<p>If\u00a0 only impacting a specific page, then consider using a Page Rule to exclude that page by URL from optional performance features.<\/p>\n<p>&nbsp;<\/p>\n<p><span data-sheets-root=\"1\">Please refer to the following article to know more.<br \/>\nKnowledge Base:<a href=\"https:\/\/www.servergigabit.com\/guide\/kb\/how-do-i-asynchronously-when-load-javascript\"> How do I asynchronously when load JavaScript?<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How can I ignore the specific JavaScripts? You can have Rocket Loader ignore individual scripts by adding the data-cfasync=\u201dfalse\u201d attribute to the relevant script tag, for example: &lt;script\u00a0data-cfasync=\u201dfalse\u201d\u00a0src=\u201d\/javascript.js\u201d&gt;&lt;\/script&gt; It will still optimise the loading of all other scripts on the page. Notes: Adding this attribute within specific JavaScript will not work if you wish to exclude the script. If the&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"kbtopic":[43],"kbtag":[1410],"class_list":["post-1633","kb","type-kb","status-publish","hentry","kbtopic-cloudflare","kbtag-specific-javascripts"],"_links":{"self":[{"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kb\/1633","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kb"}],"about":[{"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/types\/kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/comments?post=1633"}],"version-history":[{"count":4,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kb\/1633\/revisions"}],"predecessor-version":[{"id":6015,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kb\/1633\/revisions\/6015"}],"wp:attachment":[{"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/media?parent=1633"}],"wp:term":[{"taxonomy":"kbtopic","embeddable":true,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kbtopic?post=1633"},{"taxonomy":"kbtag","embeddable":true,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kbtag?post=1633"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}