this should never be used

This commit is contained in:
ccd0 2014-06-15 12:21:35 -07:00
parent 572d54e0bb
commit c9e62f3889

View File

@ -47,10 +47,10 @@ $.ajax = do ->
# This saves a lot of bandwidth and CPU time for both the users and the servers. # This saves a lot of bandwidth and CPU time for both the users and the servers.
lastModified = {} lastModified = {}
(url, options, extra={}) -> (url, options, extra={}) ->
{type, whenModified, upCallbacks, form, sync} = extra {type, whenModified, upCallbacks, form} = extra
r = new XMLHttpRequest() r = new XMLHttpRequest()
type or= form and 'post' or 'get' type or= form and 'post' or 'get'
r.open type, url, !sync r.open type, url, true
if whenModified if whenModified
r.setRequestHeader 'If-Modified-Since', lastModified[url] if url of lastModified r.setRequestHeader 'If-Modified-Since', lastModified[url] if url of lastModified
$.on r, 'load', -> lastModified[url] = r.getResponseHeader 'Last-Modified' $.on r, 'load', -> lastModified[url] = r.getResponseHeader 'Last-Modified'