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

6,033 thoughts on “MooTools Depender, Safari, etags and 412 Precondition Failed

  1. James Rodriguez james-rodriguez biography: personal life latest news Instagram goals transfer to Rayo Vallecano statistics and captain of the Colombian national team.

  2. Biography Pau Victor pau victor is a Spanish footballer who started in the lower divisions. Thanks to hard work he got into a good youth team at FC Barcelona. He played for Girona and has good statistics.

  3. Biography of Jamie Bynoe-Gittens jamie gittens az org a winger for German club Borussia Dortmund and an English footballer.

  4. Nicholas Jackson nicolas jackson is a Senegalese professional footballer who has taken the football world by storm with his play and achievements.

  5. When Huseyin and Naime hakan-calhanoglu-az org welcomed their son Hakan to Monchengladbach Germany during the 1994 World Cup they had no idea he was destined to become a star. Learn his biography facts and news.

  6. Biography of Ollie Watkins https://ollie-watkins-az.org an English striker for Aston Villa and the England national team. Find out about his career clubs such as Exeter City and Brentford height age achievements participation in Euro 2024 personal life and latest news.

  7. Francisco Conceicao francisco conceicao was born into a family where football was already a part of the family with a legacy built on hard work and passion. Juventus Porto and Portugal national team appearances brother Rodrigo FIFA stats and news.

  8. Ищете качественный кирпич напрямую от производителя? https://Muravey61.ru – ваш надежный поставщик строительных материалов в регионе Мы предлагаем кирпич высшего качества по доступным ценам прямо с завода. Доставка точно в срок широкий ассортимент и гарантированное качество – всё что нужно для вашего строительства. Закажите у нас и убедитесь сами что с нами строить легко

  9. Wout Weghorsts https://wout-weghorst-az.org background is similar to Jamie Vardys as both players rose from relative obscurity to achieve success in football. Career playing for Burnley and Manchester United clash with Messi participation in Euro 2020 World Cup 2022.

  10. Biography of Emre Can emre-can-az.com/ a German footballer midfielder for Borussia Dortmund and the national team. A career full of achievements and participation in Euro 2024 including games for Bayern Liverpool and Juventus.

  11. In the process of rising to popularity eberechi-eze-az org Eze is now celebrated around the world for his footballing prowess with many fans unaware of his difficult beginnings.

  12. Biography of Spanish footballer Mikel Merino https://mikel-merino-az.org midfielder for Real Sociedad and the Spanish national team. Games for Borussia and Newcastle height and age achievements and participation in the 2024 European Championship.

  13. Growing up in the natural https://nuno-mendes-az.org mountains of Sintra Portugal young Nuno Mendes quickly became a local sensation thanks to his impressive football game. He is playing for Paris Saint-Germain and Portugal at EURO 2024.

  14. Biography of Austrian footballer marko arnautovic az org Arnautovic Marko – games at FC Werder Bremen and Internationale market value achievements. Personal life conflicts rumors and latest news.

  15. Aurelien Tchouamenis aurelien tchouameni az org biography: personal life date of birth parents jobs statistics at Real Madrid and Monaco position jersey number 2024 updates.

  16. Biography of football player antoine griezmann Antoine Griezmann: personal life birth of children national origin. Now his career playing for Atletico Madrid.

  17. Biography of Portuguese bernardo-silva-az.com footballer Bernardo Silva: personal life relationship with his wife similarities with Bruno Fernandes. Current team number on the field reviews of fans who have sold out.

  18. Biography of Spanish pedri-az.com footballer Pedri statistics at Barcelona ??games with teammate Gavi joining the national team for the Euros.

  19. Biography of Brazilian football player Rodrigo rodrygo-az com photos of the striker of the Real Madrid club and the Brazilian national team sports career.

  20. Biography of Brazilian alisson-becker-az.com footballer Alisson: photo of the goalkeeper of the Liverpool club and the national team sports career playing for FC Inter and Roma growth achievements.

  21. Предлагаем услуги профессиональных инженеров офицальной мастерской. Еслли вы искали срочный ремонт iphone 14 pro max можете посмотреть на сайте: ремонт iphone 14 pro max сервис Наши мастера оперативно устранят неисправности вашего устройства в сервисе или с выездом на дом

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

  23. Нужен ремонт техники https://чинпочин.рус все услуги для вашего дома в одном месте Выбирайте мастеров для ремонта уборки или сантехнических работ. Качественный сервис прозрачные цены и удобство использования.

  24. Нужен ремонт техники фирма чин почин все услуги для вашего дома в одном месте Выбирайте мастеров для ремонта уборки или сантехнических работ. Качественный сервис прозрачные цены и удобство использования.

  25. Biography of footballer iker-casillas-az.com Iker Casillas: personal life separation from ex-wife Sara Carbonero.

  26. Biography of Spanish footballer Dani Carvajal dani-carvajal-az.com personal life marriage to Joselu and twin sisters. Performances at the Euro for Real Madrid and the Spanish national team.

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>