Closed
Bug 1214819
Opened 10 years ago
Closed 10 years ago
Need a way to do anonymous prefetching
Categories
(Core :: Networking, defect)
Core
Networking
Tracking
()
RESOLVED
FIXED
mozilla44
Tracking | Status | |
---|---|---|
firefox44 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
(Keywords: dev-doc-complete)
Attachments
(2 files)
3.44 KB,
patch
|
u408661
:
feedback+
|
Details | Diff | Splinter Review |
3.80 KB,
patch
|
u408661
:
review+
|
Details | Diff | Splinter Review |
See bug 1172205 comment 39. We end up in CacheFileUtils::AppendKeyPrefix on those urls and then end up with different key prefixes for the anon and non-anon case. Which means we need a way to do anon prefetch.
Most simply, could we just support @crossorigin on <link rel="prefetch">?
Flags: needinfo?(hurley)
![]() |
Assignee | |
Comment 1•10 years ago
|
||
Attachment #8673853 -
Flags: feedback?(hurley)
![]() |
Assignee | |
Comment 2•10 years ago
|
||
Drew, I kicked off some test builds with this patch. I'll post a link to them here once they complete.
With those builds, I think your test from bug 1172205 comment 39 should work the way you want, if you use <link rel="prefetch" crossorigin"> to do the prefetching.
![]() |
Assignee | |
Comment 3•10 years ago
|
||
Builds:
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/bzbarsky@mozilla.com-62cf7402e690/try-linux64/firefox-44.0a1.en-US.linux-x86_64.tar.bz2
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/bzbarsky@mozilla.com-62cf7402e690/try-macosx64/firefox-44.0a1.en-US.mac.dmg
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/bzbarsky@mozilla.com-62cf7402e690/try-win32/firefox-44.0a1.en-US.win32.zip
Comment 4•10 years ago
|
||
Thank you, Boris.
Attempting to open the linked Mac OS build, I get the error: "Nightly" is damaged and can't be opened.
Comment 5•10 years ago
|
||
Also, I added a page in bug 1172205 comment 41 that has the same prefetch tag but with the crossorigin="anonymous" attribute.
![]() |
Assignee | |
Comment 6•10 years ago
|
||
> I get the error: "Nightly" is damaged and can't be opened.
Is that opening the dmg, or running the resulting binary? I just tried downloading it and copying to my desktop and running it and it seems to work fine....
Comment 7•10 years ago
|
||
The dmg opens fine. When attempting to launch the binary, Mac OS shows a security icon and a progress bar, and a message about verifying the file. That then ends in the error message.
![]() |
Assignee | |
Comment 8•10 years ago
|
||
Huh. Odd... I can run it fine from here (at least via the command line, by running Nightly.app/Contents/MacOS/firefox from Terminal).
Comment on attachment 8673853 [details] [diff] [review]
So perhaps like this
Review of attachment 8673853 [details] [diff] [review]:
-----------------------------------------------------------------
The code itself looks reasonable to me. I haven't fully thought through the idea of enforcing CORS on prefetch, but it seems right (CORS would be enforced on the real fetch later on, anyway). So I think it's worth throwing at the internet and seeing if anything breaks :)
Attachment #8673853 -
Flags: feedback?(hurley) → feedback+
Comment 10•10 years ago
|
||
(In reply to Drew Stamps from comment #7)
> The dmg opens fine. When attempting to launch the binary, Mac OS shows a
> security icon and a progress bar, and a message about verifying the file.
> That then ends in the error message.
Are you attempting to launch directly from the dmg? I seem to remember having that same problem if I don't copy the app to a writeable directory, but I could be wrong.
Flags: needinfo?(hurley)
![]() |
Assignee | |
Comment 11•10 years ago
|
||
I guess there's no spec for this prefetching stuff so we can just unilaterally do it... OK, then.
![]() |
Assignee | |
Comment 12•10 years ago
|
||
Let's try for actual review, with a commit message and all
Attachment #8674000 -
Flags: review?(hurley)
![]() |
Assignee | |
Updated•10 years ago
|
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Comment 13•10 years ago
|
||
Thanks, Boris. Nightly launches for me from the command line.
And... the change seems to work for my sample pages. Excellent!
Attachment #8674000 -
Flags: review?(hurley) → review+
Comment 14•10 years ago
|
||
![]() |
Assignee | |
Comment 15•10 years ago
|
||
Not sure whether we have real docs for this anywhere...
Keywords: dev-doc-needed
Comment 16•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
Comment 17•9 years ago
|
||
(In reply to Boris Zbarsky [:bz] from comment #15)
> Not sure whether we have real docs for this anywhere...
We have; I've updated: https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types
and
https://developer.mozilla.org/en-US/Firefox/Releases/44#HTML
Keywords: dev-doc-needed → dev-doc-complete
You need to log in
before you can comment on or make changes to this bug.
Description
•