So in theory, it should check first source (cloudflare) and if not succeeded it should downlod fallback-href from my local host ..
But it is always downloading both sources and caches both of them to the browser when a request is sent !!
I deleted/renamed my local css file, so the external (cloudflare) becomes active ! I disconnected internet connection/rename cloudflarelink/change hash code/... so always local file used, but when both of them are next together as you see in above, I expect
the external css file comes to service as it was downloaded but didn't effect the page, because the second one is downloaded too and has more priority I think!!
I changed some classes in my local file (and surely not the one to be tested in asp-fallback-test-class), to find out which css file (internal/external) is active at the moment. If the above code is wrong so why when I disorder/dismiss any of the two, another
comes to service ?? but when both of them are in service always my local has more priority but I do not want it !
the fallback tag helper is simple. with javascript it renders a meta tag with the specified class name. it then checks if the meta tag has property and value specified in the test. if the javascript test does not match, it adds a link to the fallback. the
fallback then overrides the originals,
if your page is loading both (use browsers network trace), then the property test is failing. you will need to update it.
I do not know why this happened , maybe the word "! important" in test value was problem. I really don't know what kind of class-test should we check for call back. But your trigger made me to answer. Thanks
Member
3 Points
15 Posts
Asp-fallback tag helper download both resources always !!
Dec 07, 2020 11:04 AM|ehsan_kabiri_33|LINK
This is my stylesheet code on my local host: (I'm using W3.Css not bootstrap for simplicity, it does not matter)
So in theory, it should check first source (cloudflare) and if not succeeded it should downlod fallback-href from my local host ..
But it is always downloading both sources and caches both of them to the browser when a request is sent !!
I deleted/renamed my local css file, so the external (cloudflare) becomes active ! I disconnected internet connection/rename cloudflarelink/change hash code/... so always local file used, but when both of them are next together as you see in above, I expect the external css file comes to service as it was downloaded but didn't effect the page, because the second one is downloaded too and has more priority I think!!
I changed some classes in my local file (and surely not the one to be tested in asp-fallback-test-class), to find out which css file (internal/external) is active at the moment. If the above code is wrong so why when I disorder/dismiss any of the two, another comes to service ?? but when both of them are in service always my local has more priority but I do not want it !
All-Star
57864 Points
15491 Posts
Re: Asp-fallback tag helper download both resources always !!
Dec 07, 2020 04:43 PM|bruce (sqlwork.com)|LINK
the fallback tag helper is simple. with javascript it renders a meta tag with the specified class name. it then checks if the meta tag has property and value specified in the test. if the javascript test does not match, it adds a link to the fallback. the fallback then overrides the originals,
if your page is loading both (use browsers network trace), then the property test is failing. you will need to update it.
Member
3 Points
15 Posts
Re: Asp-fallback tag helper download both resources always !!
Dec 07, 2020 06:12 PM|ehsan_kabiri_33|LINK
Thanks for replying. I changed the test class so I got the favorite .
I do not know why this happened , maybe the word "! important" in test value was problem. I really don't know what kind of class-test should we check for call back. But your trigger made me to answer. Thanks