Mobile styling showing after opened on Desktop

  • 16 February 2021
  • 0 replies

Userlevel 4
Badge +16


Mobile styling showing after opened on Desktop

This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice. This article is not considered official documentation for K2 software and is provided "as is" with no warranties.


When a form is opened on a mobile device (not in the K2 Workspace or K2 Mobile apps), the mobile styling can become cached.  Opening the same form on a desktop device will then continue to show the styling as if still on a mobile device. 


This can be confirmed in both appearance as well as in the browser console by hitting 'F12.'  An IIS reset will temporarily resolve the issue, but will continue to occur after the forms are opened on a mobile device again.


In both the SmartForms Runtime and SmartForms Designer web.config files, you will notice the following line:  

<add name="RT profile" duration="3600" varyByParam="_ID;_NAME;_MODE;_STATE;_THEME;_OVERFLOWY;__CALLBACKID;_DEBUG;_RENDERWORKFLOWSTRIP;_DRAFTID;_NAVIGATEDSERVEREVENTS" varyByHeader="Accept-Encoding" varyByCustom="userversion;userculture;jq-legacy" enabled="true" location="Server" />

The above line of code is found in the <caching> node.  In this node, edit "varyByCustom="userversion;userculture;jq-legacy" to read as "varyByCustom="userversion;userculture;jq-legacy;browser" by appending ';browser' at the end.  

Afterward, save the .config files and reset IIS.  This should prevent the caching from occurring in the future.


0 replies

Be the first to reply!