web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

issue on browser cached JavaScript web resource

(0) ShareShare
ReportReport
Posted on by 259

Hello, anyone encountered any issue on browser cached JavaScript web resource? The latest JavaScript will not reflect immediately even you cleared the browser cache/history and refresh the page. What I noticed is I need to perform at least 5 or more browser refresh before the JavaScript starts working. I understand that the browser cache clearing and refreshing the page is a BASIC thing for the web app but doing this more than once in CRM 2011 is pretty annoying. As of now I don’t have a big .js file everything are less than 100KB or less. My environments are CRM 2011On-premise UR13 and CRM 365. Both environments encountered the same issue. Any idea how this happened and how to resolve it?

*This post is locked for comments

I have the same question (0)
  • Muhammad Adeel Javaid Profile Picture
    5,580 on at

    Try changing the JavaScript file's src From this:

    <script language="JavaScript" src="js/myscript.js"></script>

    To this:

    <script language="JavaScript" src="js/myscript.js?n=1"></script>

    This method should force your browser to load a new copy of the JS file.

  • Muhammad Adeel Javaid Profile Picture
    5,580 on at

    Additionally I am copying a link below that could be helpful for you:

    stackoverflow.com/.../clear-the-cache-in-javascript

  • Mark Anthony Sabado Profile Picture
    259 on at

    Thanks for your answer, however your suggested approach is already build-in in Microsoft Dynamics CRM WebResource.

    Any idea how this happened and how to resolve it in Microsoft Dynamics CRM 2011 On-premise and CRM 365, especially if your suggestion is already build-in features for the webresource.

  • Mark Anthony Sabado Profile Picture
    259 on at

    Additional Info:

    All the codes written are tested and passed the unit testing. And also I noticed even the simple wrapper function to get the field value of attribute in common.js throws an error. We're using the CTRL + SHIFT + DEL to clear the cache and CTRL + F5 to refresh the page. And the browser is IE.

  • Suggested answer
    Muhammad Adeel Javaid Profile Picture
    5,580 on at

    Here is a useful article for you:

    www.avanadeblog.com/.../crm-2011-data-caching.html

  • James Reinhardt Profile Picture
    222 on at

    Mark,

    I assume none of the below items helped you, as none of them are possible with the situation you are facing.

    I'm also having the same issue (in IE), and would love you know if you ever found a resolution (as this issue is a year old).

    Thanks!

    -James

  • Clint Woods Profile Picture
    1,031 on at

    I am also experiencing that both IE and Firefox do not clear the cached JavaScript in CRM Online, sometimes even after manually clearing the cache, F12 continues to show my old code. Amazing trick but this 'feature' makes debugging quite cumbersome. Perhaps if we keep this thread active, someone will come up with the solution.

    -clint

  • Abe Saldana Profile Picture
    390 on at

    I had the same issue with my IE 9, and want to ensure that the cache and all temporary files are deleted completely and get the most updated version the next time I load in the web site.

    I blogged about in the following link

    www.crmbuzz.co/ieclearcache

    please let me know if this help with the issues on sticking javascript scripts and the cache.

    Abe Saldana

    http://CRMBuzz.co

  • Suggested answer
    Peter72 Profile Picture
    1,815 on at

    Using the "clear Cache" functionality within the F12 Debugger solves the Problem.

    F12, Strg + R, F12

    Refresh your Page with Strg + F5 afterwards, and you will get the latest JScript code.

    Hope this helps!

  • Clint Woods Profile Picture
    1,031 on at

    nope. sorry. tried that long before posting here...

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans