link element prefetching not working in Firefox 3.6
Asked Answered
S

1

7

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 being 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?

Severson answered 29/1, 2010 at 0:14 Comment(2)
I have the same problem. Does anybody have an idea on this?Gardy
So did you find what was wrong?Bangs
I
2

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.

Irrigate answered 10/8, 2012 at 20:2 Comment(1)
Thanks for giving this an answer. Had completely forgotten about this.Severson

© 2022 - 2024 — McMap. All rights reserved.