September 29, 2016

Forge Viewer - Always use versioning in production code

Default blog image

We briefly moved to a new default version of the viewer today (v2.11). However, after receiving several reports of 401 errors by people using the new version, we're reverting back to v2.10 while we investigate those reports. Sorry if this affected your application :-(.

However, this provides a good opportunity to remind you again that we recommend you should always reference a specific viewer version from your production applications. This will prevent you being surprised by a new version of the viewer suddenly appearing in your application. A new version may have a changed UI or even a changed API. Versioning isn't required for your development and testing code of course, where you may prefer to always reference the newest version.

To reference a specific viewer version, you should reference the viewer JavaScript and CSS files like this:

JS: https://developer.api.autodesk.com/viewingservice/v1/viewers/viewer3D.min.js?v=2.10.*
CSS: https://developer.api.autodesk.com/viewingservice/v1/viewers/style.min.css?v=2.10.*

You can find viewer version information here.

To always use the latest version, you just omit the version parameter, like this:

JS: https://developer.api.autodesk.com/viewingservice/v1/viewers/viewer3D.min.js  
CSS: https://developer.api.autodesk.com/viewingservice/v1/viewers/style.min.css

 

Once again, we strongly recommend that you DO NOT use the unversioned URL in your production code (unless you like surprises :-)).

Related Posts

June 5, 2019

What icons are provided by the Viewer stylesheet

At the Forge Accelerator in Boston Tianmin asked if there was an easy way to see

Read More