WICG / nav-speculation

Proposal to enable privacy-enhanced preloading
https://wicg.github.io/nav-speculation/
Other
152 stars 35 forks source link

Priority/Order of pre-renders #288

Closed thinklinux closed 10 months ago

thinklinux commented 10 months ago

As far as I can see in the application tab in dev tools, urls are pre-rendered in alphabetical order. Tho in the list they are put in the order I want to be pre-rendered from left to right. I couldn't find anything about that topic. Is there a way to set priority/order in which urls are being pre-rendered? Or is there a strong reason why it is made like that right now?

Example:

{
    "prerender": [
        {
            "source": "list",
            "urls": [
                "http://localhost:3000/ordinaryHref_03",
                "http://localhost:3000/ordinaryHref_02"
            ]
        }
    ]
}

Screenshot 2023-11-22 at 16 16 33

Update: Okay if I get every url in separate speculation rule script tag then it works in the order that I want. Is that expected behavior? I tried going a little bit in the chromium code but I didn't see anything that is sorting the speculation rules in any specific order. Of course maybe I was just looking at the wrong place :D

domenic commented 10 months ago

As far as I can tell, this is not an issue with the specification we're developing in this repository, but instead a question about a specific implementation, the Chromium one. So, I'll close it, and encourage you to file an issue on https://crbug.com/ for future Chromium-specific problems.

I've done so for you at https://bugs.chromium.org/p/chromium/issues/detail?id=1505301 right now.

thinklinux commented 10 months ago

@domenic Thank you! You are awesome!