{"id":643,"date":"2020-07-02T03:55:19","date_gmt":"2020-07-02T03:55:19","guid":{"rendered":"https:\/\/loftocean.com\/doc\/loftloader\/?page_id=643"},"modified":"2020-10-24T08:14:06","modified_gmt":"2020-10-24T08:14:06","slug":"exclude-code-from-caching-wp-rocket","status":"publish","type":"page","link":"https:\/\/loftocean.com\/doc\/loftloader\/common-issues\/exclude-code-from-caching-wp-rocket\/","title":{"rendered":"Exclude Code from Caching &#8211; WP Rocket"},"content":{"rendered":"<p>If you are using WP Rocket, please follow this instructions to exclude the code of LoftLoader Pro.<\/p>\n<hr>\n<h5>Step 1. Exclude Inline JavaScript<\/h5>\n<p>This setting can be find here: <strong>WP Rocket Settings<\/strong> > <strong>File Optimization<\/strong> > <strong>Exclude Inline JavaScript<\/strong>.<\/p>\n<p><span class=\"highlighted\">Please note: This option may not exist in some versions because of different versions of the plugin. In this case, you can skip this step and go to the second step.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/loftocean.com\/doc\/loftloader\/wp-content\/uploads\/sites\/3\/2019\/12\/wprocket-file-optimization.png\" alt=\"\" width=\"1150\" height=\"859\" class=\"alignnone size-full wp-image-509\" srcset=\"https:\/\/loftocean.com\/doc\/loftloader\/wp-content\/uploads\/sites\/3\/2019\/12\/wprocket-file-optimization.png 1150w, https:\/\/loftocean.com\/doc\/loftloader\/wp-content\/uploads\/sites\/3\/2019\/12\/wprocket-file-optimization-300x224.png 300w, https:\/\/loftocean.com\/doc\/loftloader\/wp-content\/uploads\/sites\/3\/2019\/12\/wprocket-file-optimization-768x574.png 768w, https:\/\/loftocean.com\/doc\/loftloader\/wp-content\/uploads\/sites\/3\/2019\/12\/wprocket-file-optimization-1024x765.png 1024w\" sizes=\"auto, (max-width: 1150px) 100vw, 1150px\" \/><\/p>\n<p>Please add the following 2 lines to <strong>&#8220;Exclude Inline JavaScript&#8221;<\/strong>. <\/p>\n<pre style=\"border: 1px solid #eee; background:#fff; padding: 30px;\">\r\nloftloaderPro\r\nloftloaderCache\r\n<\/pre>\n<p>&nbsp;&nbsp;<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/loftocean.com\/doc\/loftloader\/wp-content\/uploads\/sites\/3\/2020\/07\/exclude-inline-js-2.jpg\" alt=\"\" width=\"1150\" height=\"859\" class=\"alignnone size-full wp-image-665\" srcset=\"https:\/\/loftocean.com\/doc\/loftloader\/wp-content\/uploads\/sites\/3\/2020\/07\/exclude-inline-js-2.jpg 1150w, https:\/\/loftocean.com\/doc\/loftloader\/wp-content\/uploads\/sites\/3\/2020\/07\/exclude-inline-js-2-300x224.jpg 300w, https:\/\/loftocean.com\/doc\/loftloader\/wp-content\/uploads\/sites\/3\/2020\/07\/exclude-inline-js-2-768x574.jpg 768w, https:\/\/loftocean.com\/doc\/loftloader\/wp-content\/uploads\/sites\/3\/2020\/07\/exclude-inline-js-2-1024x765.jpg 1024w\" sizes=\"auto, (max-width: 1150px) 100vw, 1150px\" \/><\/p>\n<p>Then, please always <strong>clear your site cache<\/strong> and <strong>browser cache<\/strong> after making changes, then refresh page and check again.<\/p>\n<hr>\n<h5>Step 2. Exclude JavaScript files of LoftLoader<\/h5>\n<p>If the problem still persists after excluding inline JavaScript, then please also exclude the <strong>JavaScript files<\/strong> of LoftLoader.<\/p>\n<pre style=\"border: 1px solid #eee; background:#fff; padding: 30px;\">\r\n\/wp-content\/plugins\/loftloader-pro\/(.*).js\r\n<\/pre>\n<p>&nbsp;&nbsp;<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/loftocean.com\/doc\/loftloader\/wp-content\/uploads\/sites\/3\/2020\/07\/wp-rocket-exclude-js-files-1.jpg\" alt=\"\" width=\"942\" height=\"676\" class=\"alignnone size-full wp-image-644\" srcset=\"https:\/\/loftocean.com\/doc\/loftloader\/wp-content\/uploads\/sites\/3\/2020\/07\/wp-rocket-exclude-js-files-1.jpg 942w, https:\/\/loftocean.com\/doc\/loftloader\/wp-content\/uploads\/sites\/3\/2020\/07\/wp-rocket-exclude-js-files-1-300x215.jpg 300w, https:\/\/loftocean.com\/doc\/loftloader\/wp-content\/uploads\/sites\/3\/2020\/07\/wp-rocket-exclude-js-files-1-768x551.jpg 768w\" sizes=\"auto, (max-width: 942px) 100vw, 942px\" \/><\/p>\n<p>&nbsp;&nbsp;<br \/>\nAfter excluding the JavaScript files of LoftLoader Pro, if there are any JS error, please <strong>ALSO<\/strong> add the following line of code to manually exclude jQuery: <\/p>\n<pre style=\"border: 1px solid #eee; background:#fff; padding: 30px;\">\r\n\/wp-includes\/js\/jquery\/jquery.js\r\n<\/pre>\n<p>&nbsp;&nbsp;<br \/>\nPlease refer to the following screenshot:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/loftocean.com\/doc\/loftloader\/wp-content\/uploads\/sites\/3\/2020\/07\/wp-rocket-exclude-js-files.jpg\" alt=\"\" width=\"942\" height=\"676\" class=\"alignnone size-full wp-image-645\" srcset=\"https:\/\/loftocean.com\/doc\/loftloader\/wp-content\/uploads\/sites\/3\/2020\/07\/wp-rocket-exclude-js-files.jpg 942w, https:\/\/loftocean.com\/doc\/loftloader\/wp-content\/uploads\/sites\/3\/2020\/07\/wp-rocket-exclude-js-files-300x215.jpg 300w, https:\/\/loftocean.com\/doc\/loftloader\/wp-content\/uploads\/sites\/3\/2020\/07\/wp-rocket-exclude-js-files-768x551.jpg 768w\" sizes=\"auto, (max-width: 942px) 100vw, 942px\" \/><\/p>\n<hr>\n<h5>Step 3. Exclude CSS files of LoftLoader<\/h5>\n<p>To ensure that LoftLoader works properly, you may also need to exclude the <strong>CSS files<\/strong> of LoftLoader. <\/p>\n<p>You will need to check the first 2 checkboxes (&#8220;<strong>Minify CSS files<\/strong>&#8221; and &#8220;<strong>Combine CSS files<\/strong>&#8220;) to display the &#8220;<strong>Excluded CSS Files<\/strong>&#8221; box. And then please add the following code to the &#8220;<strong>Excluded CSS Files<\/strong>&#8221; box:<\/p>\n<pre style=\"border: 1px solid #eee; background:#fff; padding: 30px;\">\r\n\/wp-content\/plugins\/loftloader-pro\/(.*).css\r\n<\/pre>\n<p>&nbsp;&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/loftocean.com\/doc\/loftloader\/wp-content\/uploads\/sites\/3\/2020\/07\/wp-rocket-exclude-css-files.jpg\" alt=\"\" width=\"942\" height=\"596\" class=\"alignnone size-full wp-image-646\" srcset=\"https:\/\/loftocean.com\/doc\/loftloader\/wp-content\/uploads\/sites\/3\/2020\/07\/wp-rocket-exclude-css-files.jpg 942w, https:\/\/loftocean.com\/doc\/loftloader\/wp-content\/uploads\/sites\/3\/2020\/07\/wp-rocket-exclude-css-files-300x190.jpg 300w, https:\/\/loftocean.com\/doc\/loftloader\/wp-content\/uploads\/sites\/3\/2020\/07\/wp-rocket-exclude-css-files-768x486.jpg 768w\" sizes=\"auto, (max-width: 942px) 100vw, 942px\" \/><\/p>\n<p>If you chose to save the loader&#8217;s &#8220;customize styles&#8221; as an external CSS file, please also add the following code:<\/p>\n<pre style=\"border: 1px solid #eee; background:#fff; padding: 30px;\">\r\n\/wp-content\/uploads\/loftloader-pro\/custom-styles.css\r\n<\/pre>\n<p>&nbsp;&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/loftocean.com\/doc\/loftloader\/wp-content\/uploads\/sites\/3\/2020\/10\/wp-rocket-exclude-external-css.png\" alt=\"\" width=\"2298\" height=\"1452\" class=\"alignnone size-full wp-image-697\" srcset=\"https:\/\/loftocean.com\/doc\/loftloader\/wp-content\/uploads\/sites\/3\/2020\/10\/wp-rocket-exclude-external-css.png 2298w, https:\/\/loftocean.com\/doc\/loftloader\/wp-content\/uploads\/sites\/3\/2020\/10\/wp-rocket-exclude-external-css-300x190.png 300w, https:\/\/loftocean.com\/doc\/loftloader\/wp-content\/uploads\/sites\/3\/2020\/10\/wp-rocket-exclude-external-css-768x485.png 768w, https:\/\/loftocean.com\/doc\/loftloader\/wp-content\/uploads\/sites\/3\/2020\/10\/wp-rocket-exclude-external-css-1024x647.png 1024w\" sizes=\"auto, (max-width: 2298px) 100vw, 2298px\" \/><\/p>\n<p>&#8211;<\/p>\n<p>Then, please always <strong>clear your site cache<\/strong> and <strong>browser cache<\/strong> after making changes, then refresh page and check again.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are using WP Rocket, please follow this instructions to exclude the code of LoftLoader Pro. Step 1. Exclude Inline JavaScript This setting can be find here: WP Rocket Settings > File Optimization > Exclude Inline JavaScript. Please note: This option may not exist in some versions because of different versions of the plugin. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":504,"menu_order":2,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-643","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/loftocean.com\/doc\/loftloader\/wp-json\/wp\/v2\/pages\/643","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/loftocean.com\/doc\/loftloader\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/loftocean.com\/doc\/loftloader\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/loftocean.com\/doc\/loftloader\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/loftocean.com\/doc\/loftloader\/wp-json\/wp\/v2\/comments?post=643"}],"version-history":[{"count":5,"href":"https:\/\/loftocean.com\/doc\/loftloader\/wp-json\/wp\/v2\/pages\/643\/revisions"}],"predecessor-version":[{"id":700,"href":"https:\/\/loftocean.com\/doc\/loftloader\/wp-json\/wp\/v2\/pages\/643\/revisions\/700"}],"up":[{"embeddable":true,"href":"https:\/\/loftocean.com\/doc\/loftloader\/wp-json\/wp\/v2\/pages\/504"}],"wp:attachment":[{"href":"https:\/\/loftocean.com\/doc\/loftloader\/wp-json\/wp\/v2\/media?parent=643"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}