Chrome data compression proxy and DWR

笑着哭i 提交于 2019-12-22 19:23:30

问题


We are developing a web mobile application using DWR as Ajax framework and we are getting errors in Nexus 4 devices which have enabled the option Reduce data usage in the Bandwidth Management setting. The error displays an alert saying Error 502: Bad gateway and it happens when refreshing a page that calls a DWR method in the onload event.


回答1:


(I am the lead on the Chrome data compression proxy.)

The problem is a bug in the DWR library which uses JavaScript comments to contain semantically-meaningful content. The Chrome data compression proxy removes JS comments, which it is allowed to do by the headers; the fix is for DWR to use "Cache-Control: no-transform" in the DWR response headers. I emailed the DWR dev list a while back to ask about this but never heard back. We are looking for a general purpose workaround but in the meantime there's no easy fix unless DWR is fixed to work through HTTP proxies.



来源:https://stackoverflow.com/questions/21088658/chrome-data-compression-proxy-and-dwr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!