淘汰赛页面在移动设备上不起作用 [英] Knockout page not working on mobile device
问题描述
我们刚刚在我们的网站上发现了一个问题,如果用户通过移动连接而不是WIFI进行连接,则页面将失败.
We just found a problem on our website where if a user connects via a mobile connection, not WIFI, the page fails.
我们已经确定,该页面在移动案例中具有一些缩小的HTML,其中删除了重要的与剔除相关的html注释,因此绑定失败了.
What we have established is that the page has some minified HTML in the mobile case, with important knockout related html comments removed, so the binding falls over.
通过WIFI连接可以避免此问题,因此我们怀疑移动网络运营商(T-Mobile/EE)正在缩小HTML.
Connecting via WIFI avoids the problem, so we suspect that the mobile network operator (T-Mobile/EE) is minifying the html.
我们正计划将所有的剔除html注释切换为属性,但是还有其他可能的解释/解决方案,例如服务器端吗?
We are planning to switch all knockout html comments to attributes, but is there another possible explanation/solution, e.g server-side?
推荐答案
我们的移动应用今天遇到了这个确切的问题. 移动提供商正在缩小我们的html,删除包括Knockouts虚拟绑定在内的注释.
We were experiencing this exact problem today with our mobile app. The mobile provider was minifying our html, stripping comments including Knockouts virtual bindings.
解决方案是输出标头:
缓存控制:无需转换
假设您的移动服务提供商将尊重标头.另一种选择是不依赖虚拟绑定.
Assuming your mobile provider will respect the header. The other alternative is to not rely on virtual bindings.
这篇关于淘汰赛页面在移动设备上不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!