开发者

link element prefetching not working in Firefox 3.6

开发者 https://www.devze.com 2022-12-18 15:11 出处:网络
I am trying to test prefetching on Firefox 3.6. I\'m using: <link rel=\"prefetch\" href=\"hst_galaxy.jpg\"/>

I am trying to test prefetching on Firefox 3.6. I'm using:

<link rel="prefetch" href="hst_galaxy.jpg"/>

I don't see any requests in Firebug's Net panel. When I look at the Apache 2 logs, I see only the page request, nothing after. I don't see the expected X-moz: prefetch header either. I have also inspected the packets using Wireshark and the prefetch header is not bein开发者_高级运维g sent. I also used LiveHttpHeaders(FF extension), and again the prefetch header isn't sent.

I checked out my about:config options and "network.prefetch-next" is enabled.

My test setup is on Mac OS 10.5.8. I am using the local installation of Apache, and running this from a test HTML file in the sites directory. I've tried 3 different domain options:

  • localhost/cachetest
  • localhost.com/cachetest
  • www.randomurl.com/cachetest

localhost.com and randomurl.com are domains I have configured in my /etc/hosts file. The test page is accessible.

I've visited this page which says the X-Moz header is detected. http://browserspy.dk/prefetch.php In Firefox, it says yes. In Chrome/Safari it says no, which is expected. Again, I cannot detect the X-Moz header being sent with Wireshark or LiveHttpHeaders. When looking at the source of that page, I do see the right kind of <link rel="prefetch"> element though.

I'm really not sure what I'm missing. I've been pretty thorough with testing this and I don't see how this possibly is working if I detect nothing from Firefox and record nothing in Apache.

Does anyone have some enlightenment they can share?


There's a bug in Firefox 3.6 which causes prefetch to fail when the HTML5 parser is enabled. You can also try the meta syntax:

<meta http-equiv="Link" content="</images/big.jpeg>; rel=prefetch">

To see if that makes any difference.

0

精彩评论

暂无评论...
验证码 换一张
取 消