且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

加载HTML和脚本订单执行

更新时间:2023-12-04 18:16:22

是的。页面内容将被下载。

Yes. The page content will be downloaded.

浏览器必须确保它是一个有效的html文档和所有这些。下载后,解析和执行开始。但正如我在您的脚本中看到的那样,它至少会下载HTML页面和JQuery,然后才能决定是否要切换到移动网站。

The browser must be sure it is a valid html document and all that. After it downloads it, then the parsing and execution starts. But as I see in your script, it will download at least the HTML page and JQuery before it is able to decide if it wants to switch to mobile site or not.

与评论建议一样,***检查服务器端。

Like the comments suggest, it's better to check that server side.