The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

Load times & colorbox on 0.7+

oskayoskay Member
in Bugs & Feature Requests edited January 2011
Since upgrading to 0.7, we've had a significant issue with the colorbox, related to load times.

If the customer clicks the "add to cart" button on one of our product pages before the web page completely finishes loading, the colorbox does not display. Instead, the cart displays on its own page. This might not be a big deal except (1) it's really ugly -- essentially a loss of formatting -- and (2) there's no "continue shopping" link from there back to our site. The product as added to the cart also displays the famous X and Y codes, which gives us some indication how often this is happening.

Now this is clearly related to how long the page takes to load, so we have declared war on load times lately, moving from 11 s down to 3 seconds in some cases, by moving most of our static content to a cdn*. However, the problem persists, and since we've never seen this before 0.7, it seems that perhaps something has changed. Maybe there's an event in the javascript that's now waiting for the page to finish loading? It doesn't seem reasonable that images *way down the page* from our add-to-cart button should be interfering with operation this way. And, having load times that are starting to get under three seconds, there's not really much more that we can do to improve things on our end. Is there any way to restore the prior behavior?


*Footnote on load times: we had to locally cache the foxycart CSS, images, and JS files to keep reasonable load times-- we were seeing load times as high as 25 seconds yesterday due to linking to the foxycart files on your CDN. Previous times that we've looked at our load times, those foxycart files have loaded darned fast, so it seems that your CDN is only fair-weather fast.
Comments
  • brettbrett FoxyCart Team
    WOW... that's odd. We use Edgecast, which is a very large and established CDN, so ... that's really weird. We'll have to take a look at that. The entire reason we went with Edgecast was because it tested the fastest and most consistent.

    What you're seeing (whispered) makes _no_ sense, but is an absolutely horrible load time. We'll take a look and let you know about that.

    As far as the Colorbox issues: Thought v0.7.0 has reworked a lot of that stuff to make things much more flexible, it still ultimately relies on jQuery's document.ready event as it always has. Before the FoxyCart js runs the links won't have the onclick handler attached at all, so loading without the modal window is what would happen. The obvious question is why it's not attached by the time your page is loading, so we'll take a look at that as well.

    On a related note: Have you looked at using a script loader?
    http://blog.getify.com/2010/12/on-script-loaders/
  • brettbrett FoxyCart Team
    Fwiw, we haven't yet heard back from our CDN provider about this, but we did add monitoring to our CDN (the static subdomain). Here are average response times from locations around the world for the past week:
    20110131-q28t9hdr921h3u8fexruatknb1.preview.jpgClick for large view

    We'll post back if we get anything definitive, but any substantial latency on our CDN should most definitely _not_ be happening, so if you see it again please let us know.
Sign In or Register to comment.