OSX Safari Frame Load Interrupted

前端 未结 2 1169
遥遥无期
遥遥无期 2021-01-17 09:16

I have a basic HTML website (with some javascript) using a simple anchor tag to download a file like so:



        
2条回答
  •  攒了一身酷
    2021-01-17 09:54

    The only solution I can think of - is waiting till GA request will finish, and only after that set location.href to desired file download link. But this is not really good from user's perspective. (This can be achieved with hit callback https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#hitCallback).

    Probably HTML5 download attribute for href will solve the problem. I have no OSX with safari to test, so this is only my thoughts.

提交回复
热议问题