Issue metadata
Sign in to add a comment
|
script with type="text/template" or link with rel="pingback" type="text/plain" does not send request
Reported by
nip...@gmail.com,
Jul 7 2016
|
||||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36 Example URL: https://fiddle.jshell.net/niphor/ndxvr6yx/show/light/ Steps to reproduce the problem: 1. and element like <script type="text/template" src="https://www.google.com/ping"></script> or <link rel="pingback" type="text/plain" href="https://www.google.com/ping"> at html>body 2. open html in chrome What is the expected behavior? will request the url What went wrong? nothing send Did this work before? Yes Chrome Stable Channel works Chrome version: 54.0.2789.0 Channel: canary OS Version: 6.1 (Windows 7, Windows Server 2008 R2) Flash Version: Shockwave Flash 22.0 r0 Is this a bug or some feature? because my web page use this to send pingback to different services
,
Jul 7 2016
I think that the right way to support that use case would be to add support to `<link rel=pingback>` rather than to bring back support for downloading invalid scripts. Also, note that if you just want to send a ping, many people do that with a 1x1 transparent image, a "text/script" that does nothing in particular, etc.
,
Jul 7 2016
On second thought, maybe the right thing to do here is to revert https://codereview.chromium.org/2099853002 for the time being, send an "intent to deprecate & remove" to blink-dev, describe the compat risks we're aware of, current alternatives for devs, and let the API owners make an informed decision on the subject.
,
Jul 7 2016
in some reason when logout our system,we must tell some other services,and must request specific url to clear cookies that service use I choice to use script tag because: 1.it just one line thing and it should block the html as we expect 2.if use xhr way ,too many code, need deal with async 3.the url is not return an image and we cant control that. and image maybe will not block the html,let redirect method run too early that the request may not finish. this is the most simple way on current browsers....
,
Jul 7 2016
Also, seems like I totally misunderstood what `rel=pingback` is. Apparently it's a server-side feature, so "supporting" it makes little sense. A JS based approach would be to use the beacon API to get reports to the server about the fact that a certain page was visited.
,
Jul 7 2016
sorry, It's my fault. I misread my test result before. and misled you
,
Jul 7 2016
#3 SGTM. The revert is going through CQ right now. I'll draft up an email to blink-dev.
,
Jul 7 2016
Intent thread: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/eu57SCNltls > this is the most simple way on current browsers.... niphor: is this really working for you in most major browsers? On the intent thread csharrison@ says it also doesn't work in Safari (but would work in Firefox, still waiting to hear about Edge). The spec pretty clearly states that it shouldn't work. You have no control over the returned content, so you can't use type=text/script either? Seems a waste to fetch a bunch of content to just completely throw it away, right?
,
Jul 8 2016
I test it this morning, it doesn't work in ios9 Safari or Edge, works in IE<=12 and Chrome stable
,
Jul 8 2016
I think my colleague just tested it in Chrome and Android, then told me it works sorry in this case,the returned content is not important. the important is the request must send and finish before page rediect. script tag can make sure the request finishes before the next element. type=text/template makes browser no need to parse the returned content. although it against the spec ,but it works in old browsers like ie ff chrome
,
Aug 1 2016
Going to merge this one into issue 626321 to deprecate this behavior / measure breakage. |
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by csharrison@chromium.org
, Jul 7 2016