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. Hi to all, how is the whole thing, I think every one is getting more from this web site, and your
    views are fastidious designed for new people.

  2. Create vivid images with Promptchan AI — a powerful neural network for generating art based on text description. Support for SFW and NSFW modes style customization quick creation of visual content.

  3. Greetings! This is my first visit to your blog!
    We are a collection of volunteers and starting a new project in a community in the same niche.
    Your blog provided us beneficial information to work on.
    You have done a outstanding job!

  4. Hey there superb website! Does running a blog like this require a large amount of work?
    I have very little knowledge of coding but I was hoping to start my own blog soon. Anyway, if you
    have any recommendations or techniques for new blog owners please
    share. I know this is off topic but I simply had to ask.

    Kudos!

  5. Недвижимость в Болгарии у моря https://byalahome.ru квартиры дома апартаменты в курортных городах. Продажа от застройщиков и собственников. Юридическое сопровождение помощь в оформлении ВНЖ консультации по инвестициям.

  6. Автоматизация ваших штор и ворот от Somfy Автоматика Somfy Автоматика Somfy . 7 499 638-25-37

  7. I was recommended this web site by means of my
    cousin. I am not sure whether or not this submit is written through him as no one else recognise
    such special approximately my trouble. You are incredible!
    Thank you!

  8. Срочный выкуп квартир https://proday-kvarti.ru за сутки — решим ваш жилищный или финансовый вопрос быстро. Гарантия законности сделки юридическое сопровождение помощь на всех этапах. Оценка — бесплатно оформление — за наш счёт. Обращайтесь — мы всегда на связи и готовы выкупить квартиру.

  9. Создайте уют с автоматикой Somfy Автоматика Somfy Автоматика Somfy . Prokarniz

  10. I’m impressed, I must say. Rarely do I encounter a blog that’s equally educative and entertaining, and without a doubt,
    you have hit the nail on the head. The problem is something which too few men and women are speaking intelligently about.

    Now i’m very happy that I found this during my hunt for something regarding this.

  11. Портал о недвижимости https://akadem-ekb.ru всё что нужно знать о продаже покупке и аренде жилья. Актуальные объявления обзоры новостроек советы экспертов юридическая информация ипотека инвестиции. Помогаем выбрать квартиру или дом в любом городе.

  12. интернет провайдер москва msk-domashnij-internet002.ru провайдеры интернета по адресу москва

  13. Heya great blog! Does running a blog like this require a lot of work?

    I’ve very little expertise in computer programming but I was hoping
    to start my own blog soon. Anyway, should you have any suggestions or techniques for new blog owners please share.
    I know this is off topic but I just needed to ask.
    Appreciate it!

  14. Aw, this was an exceptionally good post. Taking the time and
    actual effort to make a superb article… but what can I say… I
    procrastinate a whole lot and don’t manage to get anything done.

  15. I’m curious to find out what blog system you happen to be utilizing?
    I’m experiencing some small security problems with my latest website and I’d like to find
    something more safe. Do you have any recommendations?