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,327 thoughts on “MooTools Depender, Safari, etags and 412 Precondition Failed

  1. Предлагаем ознакомиться лиды для стоматологии. Если вам понадобится перехват номера телефона обращайтесь

  2. All about Vinicius Junior vinicius-junior-bd com career trophies highlights and records. Follow the Brazilian winger his success at Real Madrid and on the international stage

  3. All about Karim Benzema karim-benzema biography achievements main goals and career moments. Find out how the striker conquered Real Madrid and continues to shine in world football

  4. All about Karim Benzema karim-benzema-bd com biography achievements main goals and career moments. Find out how the striker conquered Real Madrid and continues to shine in world football

  5. All about Karim Benzema karim benzema bd com biography achievements main goals and career moments. Find out how the striker conquered Real Madrid and continues to shine in world football

  6. стоимость клининговых услуг

  7. 1win Azerbaijan is one of the leading betting platforms in the region 1win azerbaycan is popular among sports fans for its excellent odds 1win sayti registration The user-friendly interface of 1win ensures a seamless experience Players at 1win enjoy access to exclusive betting markets 1win giris allows users to start playing instantly 1win giris and registration.

  8. Военная служба по контракту https://contract116.ru стабильность достойная зарплата социальные льготы и карьерный рост. Присоединяйтесь к профессиональной армии и получите надежное будущее

  9. The variety of games on 1win casino makes it a top choice for players The bonuses at 1win Azerbaijan make betting even more exciting 1win aviator azerbaycan 1win casino features exciting jackpot games and live dealer tables With 1win you can bet on football basketball tennis and more 1win Azerbaijan is a trusted platform for online betting and gaming 1win azerbaycan top gaming site.

  10. Kevin De Bruyne kevin-de-bruyne-az.com/ is the leader of the Manchester City and Belgium national team midfield. Find out all about his achievements matches awards and records in world football

  11. Kevin De Bruyne kevin-de-bruyne-az.com is the leader of the Manchester City and Belgium national team midfield. Find out all about his achievements matches awards and records in world football

  12. Joshua Kimmich joshua-kimmich-az.org/ the versatile leader of Bayern and the German national team The latest news stats highlights goals and assists. Follow the career of one of the best midfielders in the world

  13. Joshua Kimmich joshua kimmich the versatile leader of Bayern and the German national team The latest news stats highlights goals and assists. Follow the career of one of the best midfielders in the world

  14. стоимость клининга квартиры

  15. Rejoignez la communaute des joueurs en ligne et profitez dun large choix de jeux grace a 888starz Casino. Avec des options de paris sportifs des jeux de cartes et des promotions attractives ce casino offre une interface intuitive et des fonctionnalites avancees pour garantir une experience optimale. Telechargez lapplication et plongez dans un univers de divertissement

  16. химчистка дивана москва цена

  17. I wanted to thank you for this wonderful read!!
    I absolutely loved every bit of it. I have got you book-marked to check out new things you post…

  18. Подарки и сувениры из камня https://kameshki51.ru статуэтки шкатулки часы панно изделия из мрамора гранита и оникса. Ручная работа уникальный дизайн доставка по России

  19. Как побороть лудоманию вавада история глазами прошедшего это испытание и несколько советам тем кто в середине пути или столкнулся с этим через друзей и близких. Описываю в статье как Вавада помогла мне избавиться от игровой зависимости

  20. Образовательный портал https://moi-slovari.ru собрание полезных материалов лекций статей и справочной информации для школьников студентов и профессионалов. Учитесь легко и эффективно

  21. Как побороть лудоманию vavada история глазами прошедшего это испытание и несколько советам тем кто в середине пути или столкнулся с этим через друзей и близких. Описываю в статье как Вавада помогла мне избавиться от игровой зависимости

  22. Окунитесь в азарт с aviator-slot.ru/ Уникальная игра с захватывающим геймплеем и возможностью сорвать крупный выигрыш. Следите за коэффициентом вовремя забирайте ставку и умножайте баланс. Испытайте удачу прямо сейчас

  23. Окунитесь в азарт с https://aviator-slot.ru Уникальная игра с захватывающим геймплеем и возможностью сорвать крупный выигрыш. Следите за коэффициентом вовремя забирайте ставку и умножайте баланс. Испытайте удачу прямо сейчас

  24. Новости музыки Украины https://musicnews.com.ua популярные жанры тренды и полезные советы для музыкантов. Узнавайте больше о мире музыки и развивайте свои навыки

  25. Ставки на спорт http://betting-ru.ru ваш шанс превратить знания в выигрыш Лучшие коэффициенты огромный выбор событий и удобный интерфейс. Делайте прогнозы и побеждайте

  26. Последние новости автоспорта https://autosport-ru.ru обзоры гонок рейтинги пилотов и команд. Формула-1 Ле-Ман WRC и другие топовые серии – следите за всеми событиями в одном месте

  27. Ставки на спорт betting ваш шанс превратить знания в выигрыш Лучшие коэффициенты огромный выбор событий и удобный интерфейс. Делайте прогнозы и побеждайте

  28. стоимость клининга квартиры в москве

  29. Phil Fodens journey to the England national team is remarkable Phil Fodens song has become popular among his fans Phil Fodens dancing skills went viral on social media Phil Fodens daughter name is not widely known to the public Phil Fodens celebration style excites Manchester City fans Phil Foden social media and fan engagement.

  30. Предлагаем услуги профессиональных инженеров офицальной мастерской. Еслли вы искали ремонт фотоаппаратов canon сервис можете посмотреть на сайте: ремонт фотоаппаратов canon сервис Наши мастера оперативно устранят неисправности вашего устройства в сервисе или с выездом на дом

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>