MooTools Depender, Safari, etags and 412 Precondition Failed

/**
* This replaces the default MooTools more Depender.request function to use
* HTTP "get" rather than "post".
*
* When sending requests for files via the depender, I was finding that Safari
* wasn't getting and re-evaluating them the second time I visited the page.
* This was because an etag was sent with each script.
*
* Safari responds to etags properly and adds "If-None-Match" and
* "If-Modified-Since" headers to another request for the same file. This makes
* Apache respond with a 412 status (Precondition Failed) as it should do for
* "post" requests (according to RFC 2616).
*
* Unfortunately Safari doesn't then deal with the 412 as it does with a 304
* (Not Modified). It doesn't grab what it has in the cache and put it in the
* response, it gives you nothing.
*
* For "get" requests, Apache has to respond with a 304, or 200 or whatever, but
* not 412. So we change the request method so we don't have to deal with 412.
*/
Depender.request = function(url, callback){
    new Request.JSON({
        url: url,
        secure: false,
        onSuccess: callback,
        method:'get'
    }).send();
};

24,935 thoughts on “MooTools Depender, Safari, etags and 412 Precondition Failed

  1. Howdy! Quick question that’s entirely off topic. Do you know how to make your site mobile friendly?
    My weblog looks weird when browsing from my iphone4.
    I’m trying to find a template or plugin that
    might be able to resolve this problem. If you have any suggestions, please share.
    Thank you!

  2. Hello i am kavin, its my first time to commenting anyplace, when i read this paragraph
    i thought i could also make comment due to this brilliant article.

  3. Hello to every body, it’s my first go to see of this webpage; this web site contains awesome and actually good data
    in support of visitors.

  4. На сайте https://feringer.shop/ в огромном количестве находятся печи для саун и бань. Этот магазин является специализированным интернет-бутиком, который реализует сертифицированную, оригинальную продукцию по лучшей стоимости. В разделе вы найдете порталы ламель, дымоходы ламель, отопительные печи, а также паровые, печи-казаны и многое другое. Вся продукция высокого качества, создана в соответствии с самыми высокими технологиями и только из лучших материалов. Постоянно появляются новинки, которые необходимо рассмотреть и вам.

  5. Wow, that’s what I was exploring for, what
    a information! existing here at this website, thanks admin of this website.

  6. I am regular reader, how are you everybody? This piece of writing posted at this web site is truly good.

  7. Very nice post. I just stumbled upon your weblog and wished
    to say that I’ve really loved surfing around your blog posts.
    After all I’ll be subscribing on your rss feed and I hope you write
    again very soon!

  8. With havin so much content and articles do you ever run into any problems of plagorism or copyright infringement?
    My blog has a lot of exclusive content I’ve either written myself or outsourced but
    it appears a lot of it is popping it up all over the web without my authorization. Do you know
    any solutions to help stop content from being
    stolen? I’d really appreciate it.

  9. Pretty nice post. I simply stumbled upon your weblog and wished to say that I’ve truly loved surfing around your blog posts.
    After all I’ll be subscribing for your rss feed
    and I am hoping you write once more very soon!

  10. I think everything wrote made a great deal of
    sense. But, what about this? suppose you added a little
    content? I mean, I don’t wish to tell you how to run your blog,
    however suppose you added something that grabbed a person’s attention? I mean MooTools Depender, Safari, etags and
    412 Precondition Failed | freestyle developments is kinda
    plain. You ought to peek at Yahoo’s front page and see how they write post titles to grab people
    interested. You might add a video or a related pic or two to
    get people excited about everything’ve got to say.
    In my opinion, it would make your website a little
    bit more interesting.

  11. My partner and I absolutely love your blog and find many
    of your post’s to be exactly I’m looking for.
    can you offer guest writers to write content for yourself?

    I wouldn’t mind creating a post or elaborating on many of the
    subjects you write about here. Again, awesome blog!

  12. An impressive share! I’ve just forwarded this onto a co-worker who has been conducting a little research
    on this. And he actually bought me breakfast simply because I discovered it for him…
    lol. So let me reword this…. Thanks for the meal!!
    But yeah, thanx for spending the time to talk
    about this topic here on your website.

  13. What’s up, every time i used to check webpage posts here in the early hours in the morning,
    since i love to learn more and more.

  14. I simply couldn’t depart your website before suggesting that I really loved the standard information an individual supply in your guests?

    Is gonna be again continuously in order to check out
    new posts

  15. Aw, this was an exceptionally good post. Spending some time and actual effort to create a really good article… but
    what can I say… I hesitate a whole lot and never seem
    to get nearly anything done.