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();
};

5,450 thoughts on “MooTools Depender, Safari, etags and 412 Precondition Failed

  1. Доска бесплатных объявлений objvlenie.ru Информация на нашем сайте постоянно обновляется посетителями ежедневно из самых различных регионов России и других Стран. «objvlenie.ru» очень понятный сервис для любого пользователя любого возраста. Удобный сайт для подачи бесплатных и платных объявлений. Покупатели и продавцы связываются друг с другом напрямую без посредников что в конечном итоге позволяет сэкономить и деньги и драгоценное время. Премиум размещение стоит совсем недорого. Сайт бесплатных объявлений objvlenie.ru

  2. флористическое оформление дилерского центра доставка цветов спб недорого

  3. I and also my guys were checking the best solutions found on your web blog and instantly developed an awful feeling I had not thanked you for those tips. The boys had been for this reason excited to learn them and have unquestionably been taking advantage of those things. Many thanks for simply being simply helpful and then for getting variety of outstanding resources millions of individuals are really wanting to understand about. My very own sincere regret for not saying thanks to you sooner.

  4. La vida de Diego Maradona estuvo llena de gloria y controversia La carrera de Diego Maradona inspiró a generaciones de futbolistas El talento de Diego Maradona fue único e irrepetible Diego Maradona enfrentó varios desafíos fuera de las canchas Diego Maradona historia .

  5. Рекомендую казино онлайн лев

  6. ?? Кино как дыхание — легко и всегда! Почему бы не дышать кино без остановки? На kinogo.uk реально! Выбирайте из 50,000+ шедевров в качестве кинотеатра, удовлетворяя любые капризы! Кликайте > фильмы онлайн — очереди больше не существуют! Мы фанатеем вам — погружайтесь в киноокеан!

  7. Собственное производство металлоконструкций. Если вас интересует навес металлический для машины мы предлогаем изготовление под ключ навес для одного автомобиля

  8. прохождение игры красивые большие дома в майнкрафте

  9. Собственное производство металлоконструкций. Если вас интересует Навесы в Красном Селе мы предлогаем изготовление под ключ навесы под машину цены

  10. В группе Загородная жизнь на VK кто-то спрашивал про озеленение и в комментариях многие советовали посмотреть стоимость рулонного газона на Greenhistory.ru. Решил последовать совету – выбрал вариант заказал и через день у меня уже был шикарный зеленый участок. Быстро надежно и качественно

  11. Unlock your vehicles potential with our top-notch auto tuning services Explore your ride into a stunning masterpiece with our expert team. We specialize in modifications that cater to your unique style. Our premium solutions ensure optimal performance and enhanced appearance. Don’t settle for average; elevate your driving experience and turn heads on the road Visit us at https://phoenix-autobodyshop.com/ today and take the first step towards your dream car

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>