View and Data API 现在支持IE11了

简介:


By Daniel Du

After a long time waiting, IE11 finally supports WebGL, which enables us viewing our 3D/2D models on Internet Explorer with view and data API if IE is your favorite browser or your only option for whatever reason.

Here are some tips to make it work. Firstly, it should be IE11, previous version does not work, and you are recommended to install the new versions automatically to get the latest patches if there are any.

image

But you may get “Load Error : 4”, or HTTP 401 error when loading a model. For whatever reason IE does not send the “ads-token” cookie when the web request is made from a web worker thread. “ads-token”  is a session cookie of view and data API, It works fine if the request is made from the main thread. Setting the session cookie toggle works around the problem. Here is how to do it in your IE11 browser setting.

Go to Internet Options, and switch to “Privacy” tab:

image

Open the Advanced Privacy Settings by clicking “Advanced” button, and check “Override automatic cookie handling” , make sure the two “Accept” options are selected and “Always allow session cookies” are checked:

image

Click OK to accept the changes, now you should be able to view 3D models in IE11. Here is a test site: http://checkoutmymodel.autodesk.io/ You can drag and drop your models to upload and view, or try this link directly.

image

Yes, It is not good to ask users to change their browser setting, more investigation is undergoing for this issue. You may want to add a reminder banner to your site, telling your user to change their settings. Here is what I did with JavaScript and Bootstrap. Please note that $('#alert_placeholder') is the element where you want to show the banner, it could be body or other HTML element, a <div> for example.

 
 

var _isIE11 = !!navigator.userAgent.match(/Trident\/7\./);
if (_isIE11) {


    var message = 'It seems you are using IE11, please refer
to <a href="http://adndevblog.typepad.com/cloud_and_mobile
/2015/04/view-and-data-api-now-support-ie11.html">this
blog post</a> to config your browser to view this sample
correctly.'
;

    $('#alert_placeholder').html('<div id="alertDiv"
class="alert alert-danger">
<button type="button" class="close"
data-dismiss="alert" aria-hidden="true">&times;
</button>'
+ message + '</div>');
    var alert = $('#alertDiv');
    alert.alert();

}

 

Here is how it looks like when user access the site on IE11, putting a banner refering to this blog post for setting instructions:

clip_image001[6]

作者: 峻祁连
邮箱:junqilian@163.com 
出处: http://junqilian.cnblogs.com 
转载请保留此信息。



本文转自峻祁连. Moving to Cloud/Mobile博客园博客,原文链接:http://www.cnblogs.com/junqilian/p/4431124.html ,如需转载请自行联系原作者
相关文章
|
Java API Spring
Spring Data Solr的api demo测试操作
Spring Data Solr的api demo测试操作
164 0
Spring Data Solr的api demo测试操作
|
JavaScript 前端开发 API
Node.js 支持 fetch API
Node.js 支持 fetch API
280 0
Node.js 支持 fetch API
|
SQL 存储 缓存
深入解析 RDS Serverless 之 Data API
RDS Serverless Data API 已发布
深入解析 RDS Serverless 之 Data API
|
Prometheus Kubernetes 监控
Kruise Rollout v0.2.0 版本发布:支持 Gateway API、StatefulSet 分批发布等能力
Kruise Rollout 作为一种旁路式的渐进式交付框架,能够非常方便的与社区内优秀的应用交付平台集成。用户基本上不需要做额外的改动,只需要一份 Kruise Rollout CRD 定义即可。
Kruise Rollout v0.2.0 版本发布:支持 Gateway API、StatefulSet 分批发布等能力
EMQ
|
边缘计算 监控 物联网
NanoMQ Newsletter 2022-07|v0.10:多路桥接、HTTP 发布 MQTT 消息 API、NanoSDK 支持 MQTT 5.0
v0.10.0已于8月初正式发布,此版本主要增强了桥接功能,新增了发布消息的HTTP API,同时还为NanoSDK增加了MQTT 5.0支持。
EMQ
271 0
NanoMQ Newsletter 2022-07|v0.10:多路桥接、HTTP 发布 MQTT 消息 API、NanoSDK 支持 MQTT 5.0
|
SQL Oracle 关系型数据库
接口大师v3.13更新:支持一键导入swagger,即刻开放内部API接口
接口大师v3.13更新:支持一键导入swagger,即刻开放内部API接口
|
API Windows
Qt实用技巧:Qt中添加对windows api的支持,显示/隐藏任务栏和桌面(解决无法找到windows api)
Qt实用技巧:Qt中添加对windows api的支持,显示/隐藏任务栏和桌面(解决无法找到windows api)
|
前端开发 Java API
CORS跨域资源共享(二):详解Spring MVC对CORS支持的相关类和API【享学Spring MVC】(下)
CORS跨域资源共享(二):详解Spring MVC对CORS支持的相关类和API【享学Spring MVC】(下)
|
前端开发 Java API
CORS跨域资源共享(二):详解Spring MVC对CORS支持的相关类和API【享学Spring MVC】(中)
CORS跨域资源共享(二):详解Spring MVC对CORS支持的相关类和API【享学Spring MVC】(中)
|
存储 前端开发 Java
CORS跨域资源共享(二):详解Spring MVC对CORS支持的相关类和API【享学Spring MVC】(上)
CORS跨域资源共享(二):详解Spring MVC对CORS支持的相关类和API【享学Spring MVC】(上)
CORS跨域资源共享(二):详解Spring MVC对CORS支持的相关类和API【享学Spring MVC】(上)

热门文章

最新文章