How to handle slow FoxyCart replies

stormlifterstormlifter Member
in Bugs & Feature Requests edited April 2009
I'm sitting on 500ms replies on the javascript files and about 20 minutes ago FoxyCart was completely down and since my website <head> makes a call to the javascript file stored on your server I am stuck looping and my website won't display.

Does anyone know of a way to make the website load even if the javascript wasn't found. I'd rather have a website than not have anything at all.
Comments
  • brettbrett FoxyCart Team
    Hi Stormlifter.
    Quick solutions:
    1) Copy your CSS and JS files from the FC server to your own and call them locally. This is probably the best thing to do. The only caveat is that you'll have to remember to update those files when you move to a different FoxyCart version.

    2) Move them out of your <head> into your <body>.

    Option 1 is the better choice of the two.

    As far as response time, since the foxycart_includes.js is being called as https most tools show a much longer load time than it actually is because of the SSL overhead. We've discussed allowing these files to be loaded as http in future versions, so you may see that.

    We'll address the downtime in the other forum post (sticky, atm). Obviously that's really, really lame. We're working on it though and will update that thread as we have details.

    But as far as your question, option 1 would be a really good way to go for the time being.
  • stormlifterstormlifter Member
    edited April 2009
    Yeah I figured option 1 was okay, I just wanted to make sure that was the right thing to do. I didn't know if there was some sort of special script you had in there that called something that depended on another file on your server.

    Edit: I just thought of something. Wouldn't a browser complain that parts of the website are being served up in HTTP and others in HTTPs?

    Also, you are very awesome people. I like your straight forward no bull approach to running a software as a service. As a service provider I understand that servers go down. I hate it and as you aptly put it... it is lame. I hope the best for your servers and that they would get over their issues.
  • brettbrett FoxyCart Team
    You know, hold off on that for now actually. We need to make sure it works 100% before we recommend that action. There may be an extra step you'll have to take.

    Sorry to give you a suggestion without confirming it works 100%.
  • I have used option 1 for a few sites- copying files to my server for foxybox.

    I think I needed to set this at the top for it to work. Cant remember for sure, it was a while ago. Just use firebug to figure out if something is broken.

    if (typeof(FoxyDomain) == 'undefined') {
    var FoxyDomain = "mydomain.foxycart.com";
    }
  • brettbrett FoxyCart Team
    Thanks Chuck. That bit of code is actually at the top of the foxycart_includes.js file so you _shouldn't_ need it anywhere else.

    The important thing is to realize that you have to get _your_ foxycart_includes.js, from your domain. So you can't just pull foxycart_includes from www.foxycart.com. You'll need to pull it from yourdomain.foxycart.com for it to have the right FoxyDomain variable.

    We haven't had any reports of problems using the file locally, and I've just tested to make sure that it works with and without 3rd party cookies enabled (it does), so you should be fine. But if you do see any issues just let us know.
Sign In or Register to comment.