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. диплом написать на заказ где заказать дипломную работу

  2. I’m not sure why but this web site is loading incredibly
    slow for me. Is anyone else having this issue or is it a
    problem on my end? I’ll check back later and see if the problem still exists.

  3. It’s actually a great and useful piece of info. I’m happy that you shared this helpful information with us.
    Please keep us up to date like this. Thank you for sharing.

  4. Magnificent beat ! I would like to apprentice whilst you amend your web site, how can i subscribe
    for a weblog site? The account helped me a acceptable deal.

    I had been a little bit acquainted of this your broadcast offered brilliant
    clear idea

  5. Hi there would you mind letting me know which webhost you’re
    using? I’ve loaded your blog in 3 different web browsers and I must say this blog loads
    a lot faster then most. Can you recommend a good hosting provider at a
    fair price? Thank you, I appreciate it!

  6. You could certainly see your expertise in the work you write.
    The world hopes for more passionate writers like you who are not afraid to mention how
    they believe. At all times go after your heart.

  7. It’s appropriate time to make some plans for the future and it is time to be happy.
    I’ve read this post and if I could I wish to suggest you few interesting things or tips.
    Perhaps you could write next articles referring to this article.
    I want to read even more things about it!

  8. Terrific post however , I was wondering if you could write a litte more on this subject?
    I’d be very thankful if you could elaborate a little bit more.
    Cheers!

  9. My family members all the time say that I am killing my
    time here at net, except I know I am getting knowledge daily by reading thes pleasant posts.

  10. Please let me know if you’re looking for a article author for
    your site. You have some really good posts
    and I feel I would be a good asset. If you ever want to take
    some of the load off, I’d love to write some material
    for your blog in exchange for a link back to mine. Please blast me an email if interested.

    Cheers!

  11. Magnificent goods from you, man. I have be aware your stuff
    previous to and you are simply extremely excellent.
    I really like what you’ve acquired right here, really like what you’re saying and
    the way in which wherein you are saying it. You make it entertaining and you continue to care for to keep it wise.
    I can not wait to read far more from you. That is really a great website.

  12. I was excited to uncover this website. I wanted to
    thank you for your time for this wonderful read!! I definitely liked every part of it and
    I have you book marked to look at new information in your web site.

  13. We stumbled over here coming from a different web address and
    thought I might as well check things out. I like what I see so now i
    am following you. Look forward to looking at your web page for
    a second time.

  14. You could definitely see your skills in the work you write.
    The arena hopes for more passionate writers such as you
    who are not afraid to say how they believe. At all times go after your heart.

  15. Excellent post however , I was wondering if you could write
    a litte more on this subject? I’d be very grateful
    if you could elaborate a little bit further.

    Kudos!

  16. I loved as much as you will receive carried out right here.

    The sketch is attractive, your authored subject matter stylish.
    nonetheless, you command get got an nervousness over that you wish be delivering the following.

    unwell unquestionably come more formerly again as exactly the same nearly
    very often inside case you shield this hike.

  17. I was curious if you ever considered changing the structure
    of your blog? Its very well written; I love what youve got to say.
    But maybe you could a little more in the way of content so people could connect with it
    better. Youve got an awful lot of text for only having 1 or 2 pictures.
    Maybe you could space it out better?