Title: Error when loading website
Last modified: November 23, 2020

---

# Error when loading website

 *  Resolved [sy7k](https://wordpress.org/support/users/sy7k/)
 * (@sy7k)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/error-when-loading-website/)
 * autoptimize_f1de5f4ce20f195438045102e76762ce.js:58 Uncaught ReferenceError: $
   cart is not defined
    at oceanwpWooQuantityButtons (autoptimize_f1de5f4ce20f195438045102e76762ce.
   js:58) at HTMLDocument.<anonymous> (autoptimize_f1de5f4ce20f195438045102e76762ce.
   js:58) at i (jquery.js?ver=1.12.4-wp:2) at Object.fireWith [as resolveWith] (
   jquery.js?ver=1.12.4-wp:2) at Function.ready (jquery.js?ver=1.12.4-wp:2) at HTMLDocument.
   J (jquery.js?ver=1.12.4-wp:2)
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-when-loading-website%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/error-when-loading-website/#post-13698253)
 * OK, in the JS optimization exclusion field, can you try excluding one of below
   each line and report back which one breaks things?
 * * `wp-content/themes`
    * OR `wp-content/plugins` * OR `wp-includes/js`
 *  Thread Starter [sy7k](https://wordpress.org/support/users/sy7k/)
 * (@sy7k)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/error-when-loading-website/#post-13699608)
 * Hi,
 * I have tried all three options but the website header is not loading properly.
   
   It should look like this
 * > [View post on imgur.com](https://imgur.com/a/bofXWES)
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/error-when-loading-website/#post-13699646)
 * OK, first and foremost, make sure to disable “force JS in head” and probably “
   also aggregate inline JS” as well.
 * now with that out of the way can you retry and:
    1. when excluding e.g. `wp-content/
   plugins`, can you indeed see those being excluded from JS optimization when looking
   at the HTML source? 2. does the JS error on the console change when excluding,
   or is it always the same? 3. does unticking “minify excluded CSS/ JS” make a 
   difference when trying those exclusions?
 * frank
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/error-when-loading-website/#post-13884891)
 * any news sy7k ?
 *  Thread Starter [sy7k](https://wordpress.org/support/users/sy7k/)
 * (@sy7k)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/error-when-loading-website/#post-13888321)
 * Hi,
 * I have made it work somehow with auto-optimize .
 * So one more thing I want to understand is that my cache level is at 75 % with
   450 MB of Data being cached and the website was working great with all products
   being cached.
 * But I have a lot more products to add and the cache % will easily reach 100 %
   when I will be adding new products, any way to increase the cache limit !!
 * Also the products that are not cached are loading very slow like it takes 5-6
   seconds to load a product but when cached it is of course instantaneous, is the
   product loading slow because of low server resources and many plugins installed?
 * I have 5gb ram 5 CPU core shared wordpress hosting with I/O Usage of 1MB/s
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/error-when-loading-website/#post-13888632)
 * well, Autoptimize normally does not work on a per-page level, but when configured
   correctly will re-use the autoptimized CSS/ JS on multiple pages, in which case
   the cache size will stay more under control. what I would advice is disabling“
   also aggregate inline JS” and (if the previous is not active anyhow) also disabling“
   also aggregate inline CSS”.
 * hope this helps,
    frank
 *  Thread Starter [sy7k](https://wordpress.org/support/users/sy7k/)
 * (@sy7k)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/error-when-loading-website/#post-13966860)
 * Hi ,
    I have done as you said The website cache is just at 800 kb and around 
   3 % so that is amazing, all products are loading fast after I load them once 
   or after they are cached.
 * Only problem I see is sometime my homepage loads slow and sometimes it is instant.
 * Here is the screenshot of my setting [https://imgur.com/a/76ublcL](https://imgur.com/a/76ublcL)
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/error-when-loading-website/#post-13967098)
 * > Only problem I see is sometime my homepage loads slow and sometimes it is instant.
 * hard to say with certainty, but that sounds like a page cache cache miss .. can
   you reproduce on a test on webpagetest.org and if so provide me with the test
   result URL so I can review?
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/error-when-loading-website/#post-14048172)
 * No feedback any more, so I assume this got resolved sy7k ? Feel free to follow
   up if you still encounter issues!
 * have a nice day!
    frank

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Error when loading website’ is closed to new replies.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

 * 9 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/error-when-loading-website/#post-14048172)
 * Status: resolved