AD

Resolve IE6 does not download pictures from the Nginx server's Bug Cache

In fact, this Bug is at the two situations:

1. And Nginx has nothing to do, is for the CSS background images.

General users will not encounter, more often is the developer's own strategy of IE's cache from the default of "automatic" to "Every visit to all inquiries" that occur. Once the float is characterized by the mouse to place a background image, IE will ignore already cached images to the server again to obtain their own pictures, create photo ephemeral. This problem is relatively simple, can be resolved by the following script.

1 <script type="text/javascript"> / / <! [CDATA [

2 try (

3 document.execCommand ('BackgroundImageCache', false, true);

4) catch (e) ()

5 / / ]]></ script>

2. But in fact the more common reason is that Nginx open the Gzip compression.

This is a well-known IE6 Bug, as early as 2002, was discussed in detail, and improvements in IE7, but Microsoft has never had to repair IE6.

The fundamental reason is Nginx for Gzip enabled the http context, even if you're in the previous configuration file declared gzip_disable "MSIE [1-6].", Nginx will not use Gzip compression on IE6, but send the http header is still adopted and Gzip compressed packets that match the Vary: Accept-Encoding. IE6 does not recognize this header, IE6 on in addition to Vary: User-Agent header, the query cache is not directly to the server application. More must be yes, not using the query file is updated, but forcing a complete document. (IE7 finally kind of point is to get more information about the download file is updated to reduce the impact of this bug).

The high level of Bug, by the way the previous one is not enough. In NGINX, by add-header Cache-Control "post-check: 3600, pre-check: 43200";, as the method presented here is impossible. Explored through a painful, it was found to solve this Bug, there are two methods, one is to use Nginx's headers-more-nginx-module, experience User-Agent is IE6 (or just-do), modify header to Vary: User-Agent. But this is not a standard module, need to re-compile Nginx.

Another more simple way is such as images and CSS, JS file with what the local access statement, showing close Gzip, and manually add header.

1 if ($ http_user_agent ~ "MSIE [1-6].") (
2 # Must explicitly turns off gzip to prevent Nginx set Vary: Accept-Encoding
3 # which will prevent IE6 from caching anything
4 gzip off;
5 add_header Vary "User-Agent";
6)
After the test so I can solve the problem. Can only use $ http_user_agent here to get the browser preferences, have tried $ ancient_browser, but without success.

In addition, Nginx itself is a Gzip the Derective to control the Header, is the gzip_vary. Set as gzip_vary off should be able to solve the problem, but it is this parameter can only exist with http, location, server context where these can not be added to if the context where we can only use gzip off; to gzip to shut completely.
标签: lt, inquiries, configuration file, script type, text javascript, cdata, microsoft, ie7, cache control, nginx, background image, improvements, fundamental reason, server application, http header, background images, execcommand, gzip compression, cached images
分类: OS
时间: 2010-08-19

相关文章

  1. div dislocation / style incompatibility resolve IE6.IE7.IE8

    div dislocation / resolve IE6, IE7, IE8 incompatibility style DIV problem in IE6 dislocation Use "FLOAT: ...
  2. Web page under IE8 Dislocation - style incompatibility resolve IE6.IE7.IE8

    DIV problem in IE6 dislocation Use "FLOAT: LEFT" the DIV in IE8, IE7, no problem, IE6 but moving dow ...
  3. 机器学习之nltk download出错:Error connecting to server...

    机器学习常用到python的自然语言处理框架NLTK,这个是机器学习的常用包,在使用过程中会遇到不少问题.我会和大家分享在这其中的一些经验. 今天闲来说一下安装,在安装中出现的download错误. >>&g ...
  4. Select the mask under the bypass to resolve IE6 problem of other layers

    /** * s - Bool, Control to display a selectbox (false) Or hide (true) * e - DomElement, Control the depth of t ...
  5. java download xls file from the server to the client

    Examine the code to write an online download xls file to the client of the jsp page, as long as the file serve ...
  6. jsp download garbled and space problems

    Download on Chinese issues, the Internet has a lot of advice and answering, I had to download the code dealing ...
  7. IE6 does not support HTTP chunked mode dynamic compression protocol

    Near the Dragon Boat Festival holiday on the eve of preparing a project on-line login and registration functio ...
  8. Nginx Chinese Manual Download

    Nginx Common Applications Guide [Nginx Tips] Second Edition Study: NetSeek http://www.linuxtone.org (IT operat ...
  9. Download the new experience of HD: PT download charm

    Surely we have already very familiar with BT download, and now have a new way to download there, that is PT do ...
  10. Let IE cache on the background under ie6 background flicker problem solving document.execCommand ("BackgroundImageCache", false, true)

    Let IE cache on the background under ie6 background flicker problem solving document.execCommand ("Backgr ...
  11. Linux command download file

    p> wget download is the most commonly used linux commands, the general approach is to use: wget + space + t ...
  12. Flex download files using FileReference class

    The following example shows Flex's FileReference class in basic usage, allowing users to download a file from ...
  13. Java multi-threaded download breakpoint

    Download the file can use multiple threads to download files more quickly, multi-threaded download document wa ...
  14. Download progress shows the proportion of

    HD wallpaper in recent days because the write server-side (based on PHP + MySql), it did not update the blog s ...
  15. windows 2003 download and serial number

    1, windows Server 2003 r2 with sp2 Simplified Chinese Standard Edition Download this file 2, windows Server 20 ...
  16. FTP Using Shell script to achieve the automatic upload and download

    Operating system: linux Note: use expect, parameters for the ftp server address and file name to download para ...
  17. Using Shell script to achieve the automatic FTP upload and download

    Operating system: linux Note: use expect, parameters for the ftp server address and file name to download para ...
  18. IE6.IE7中获取Button元素的值的bug说明

    IE6.IE7中获取Button元素的值的bug说明,大家在以后使用dom操作的朋友可以注意下. 测试代码如下: <button value="abc">测试</button> ...
  19. IE6下js通过css隐藏select的一个bug

    想起ie6下,臭名昭著的select需要用iframe遮罩的bug,估计和上面的bug根由是一样的 今天遇到一个问题, 当隐藏表格行 Tr 时 $id("tr_" + id + "_1&qu ...