1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Clear Designer JavaScript Cache Programatically

Clear Designer JavaScript Cache Programatically

3 posts, 0 answered
  1. kasun
    kasun avatar
    2 posts
    Registered:
    23 Mar 2015
    06 Sep
    Link to this post

    Hello, 

    I'm trying to find a way to clear the browser cache of all the "designerview-simple.js" files for the MVC widgets that we are building. 

    The only solution we came up with to attach a unique query string to the end of the js file so when the file get attached to the document browser will recognize the file as a new file and download a fresh copy of it.  

    Here is the code : 

    @Html.Script(Url.WidgetContent("Mvc/Scripts/mywidget/mywidgetview.js?version=" +VersionNumber), "top", false)

     

    Now we want to implement the same functionality to the "designerview-simple.js" .

    However we are not able to locate where the "designerview-simple.js" loading from or how its loaded , so we can add this code and the cache will be clear. 

    OR 

    Is there a better solution for this issues ? 

    Please let us know.

    Thank you in Advance 

    Kasun Peiris

     

  2. Jonathan
    Jonathan avatar
    119 posts
    Registered:
    19 Dec 2012
    13 Sep in reply to kasun
    Link to this post
    Are you having issues with javascript files not loading the correct versions?
  3. kasun
    kasun avatar
    2 posts
    Registered:
    23 Mar 2015
    13 Sep in reply to Jonathan
    Link to this post
    Js files are loading but they are cached. Im not able to add a version number to the end of the file url as I don't know where are they loading. 
3 posts, 0 answered