#2251: iOS 6 Caching WebUI json POST requests
--------------------+-------------------------------------------------------
 Reporter:  Torawk  |       Owner:  damoxc
     Type:  bug     |      Status:  new   
 Priority:  minor   |   Milestone:  Future
Component:  webui   |     Version:        
 Keywords:          |  
--------------------+-------------------------------------------------------
 It would seem that iOS is caching the requests to the webui's json
 interface.  This is causing the UI to show what seems like a playback or
 recorded view of the progress of the torrents -- since it's showing the
 cached requests which oddly isn't always the same but seemingly changing
 and eventually sorts it self out.  But I see day old torrents randomly for
 awhile first.

 I found this on how iOS's Safari is caching in v6:

 ''No Cache-Control or Expires headers = iOS6 Safari will cache[[BR]]
 Cache-Control max-age=0 and an immediate Expires = iOS6 Safari will
 cache[[BR]]
 Cache-Control: no-cache = iOS6 Safari will NOT cache[[BR]]
 ''[[BR]]
 via http://stackoverflow.com/a/12516555 which has some more details.

 And it seems to be new with iOS 6.

 I was able to fix it locally with a single line change to json_api.py

 {{{
 @@ -274,6 +274,7 @@ class JSON(resource.Resource, component.
      def _send_response(self, request, response):
          response = json.dumps(response)
          request.setHeader("content-type", "application/x-json")
 +        request.setHeader("cache-control","no-cache")
          request.write(compress(response, request))
          request.finish()

 }}}

 This was seen with 1.3.5 on Ubuntu installed via the ppa.

-- 
Ticket URL: <http://dev.deluge-torrent.org/ticket/2251>
Deluge <http://deluge-torrent.org/>
Deluge project

-- 
You received this message because you are subscribed to the Google Groups 
"Deluge Dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/deluge-dev?hl=en.

Reply via email to