Trang web này sẽ có chức năng hạn chế trong khi chúng tôi trải qua bảo trì để cải thiện trải nghiệm của bạn. Nếu một bài viết không giải quyết được vấn đề của bạn và bạn muốn đặt câu hỏi, chúng tôi có cộng đồng hỗ trợ của chúng tôi đang chờ để giúp bạn tại @FirefoxSupport trên Twitter và /r/firefox trên Reddit.

Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Tìm hiểu thêm

Continually Polling Server / Status 304 Loops

  • 2 trả lời
  • 1 gặp vấn đề này
  • 1 lượt xem
  • Trả lời mới nhất được viết bởi the-edmeister

more options

I have pages on my website that use a Javascript loop to display an animation. Here is a typical page, the RADAR image is the animation in question: http://ozforecast.com.au/cgi-bin/weather.cgi?station=Toowoomba.QLD&radar

I have noticed in my Apache logs that sometimes Firefox clients and derivatives such as Galeon can get stuck in a loop where they hit the server with an If-Modified-Since for every image every time they go through the animation loop.

The server responds with http status 304, but then on the next pass through the animation the whole cycle repeats. This generates a lot of traffic for the clients as well as myself.

I have tried using mod_expire on the server to instruct the client to use the cached copy of the images and I can see in the HTTP headers that Cache-Control is being set correctly, however header this hasn't fixed the errant browsers: Cache-Control: max-age=86400

This only happens every now and again. At the moment my logs show three Firefox clients stuck in this loop, the user-agent strings are currently all the same: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.9) Gecko/20100824 Firefox/3.6.9 GTB7.1 ( .NET CLR 3.5.30729)

I am not sure if this is a bug per se, but I wonder if anybody could please suggest what I can do in either the Javascript or the Apache config in order to prevent clients from getting into this state?

Many thanks,

 David
I have pages on my website that use a Javascript loop to display an animation. Here is a typical page, the RADAR image is the animation in question: http://ozforecast.com.au/cgi-bin/weather.cgi?station=Toowoomba.QLD&radar I have noticed in my Apache logs that sometimes Firefox clients and derivatives such as Galeon can get stuck in a loop where they hit the server with an If-Modified-Since for every image every time they go through the animation loop. The server responds with http status 304, but then on the next pass through the animation the whole cycle repeats. This generates a lot of traffic for the clients as well as myself. I have tried using mod_expire on the server to instruct the client to use the cached copy of the images and I can see in the HTTP headers that Cache-Control is being set correctly, however header this hasn't fixed the errant browsers: Cache-Control: max-age=86400 This only happens every now and again. At the moment my logs show three Firefox clients stuck in this loop, the user-agent strings are currently all the same: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.9) Gecko/20100824 Firefox/3.6.9 GTB7.1 ( .NET CLR 3.5.30729) I am not sure if this is a bug per se, but I wonder if anybody could please suggest what I can do in either the Javascript or the Apache config in order to prevent clients from getting into this state? Many thanks, David

Tất cả các câu trả lời (2)

more options

One correction - the derived browser that I have also seen demonstrate this behaviour is Epiphany/2.22.3, not Galeon. Thanks.

more options

Try posting at the Web Development / Standards Evangelism forum at MozillaZine. The helpers over there are more knowledgeable about web page development issues with Firefox.
http://forums.mozillazine.org/viewforum.php?f=25
You'll need to register and login to be able to post in that forum.