Avoiding image compression on some 3G networks

懵懂的女人 提交于 2019-12-06 11:48:26

Have you tried setting a no-cache header? This may work on some networks.

You can also try having the client request the image a second time, this also may skip the compression.

Some 3G networks are compressing the images to save bandwith. Sometimes they do not even honor no cache http header. To bypass them, you can

  • inline base 64 your image using data-uri
  • serve them as https or via a non standard http port

Full discussion about it : http://blog.sebcante.com/2012/01/prevent-image-compression-from-3g.html

Setting a no-cache header has stopped working on some providers like Vodafone Germany a few years ago.

Instead these providers offer a webinterface where you can adjust the settings yourself. For Vodafone Germany just go to performance.vodafone.de and you will be greeted with the basic settings dialogue, but you can also choose the option "expert settings" for a more fine grained control and advanced options.

Links for different providers and countries or whole lists are very much welcome!

If you have control over the image the user downloads, you may want to put it into a ZIP file including your image, have your code unpack the image, and set it as the background. You would be sure no network apply any degradation this way.

But of course, if you don't have control over the gallery the user can select from, this solution is not applicable...

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