Forum Discussion

Ted McLaughlin's avatar
Ted McLaughlin
Brass Contributor
Feb 26, 2018

Crazy caching question

While this references Javascript, I don't think this question necessarily belongs in the developer's area.  It's more a caching question than development.  If I'm wrong a moderator can feel free to move it.

 

For our intranet we have some custom JS code that puts what we call "charms" on the site.  They are just some pretty icons that sit in the upper left corner of the screen that are shortcuts to different destinations.  For example a little computer is a shortcut to the IS Service Desk.  They are part of the master page branding that get's pushed out to every site in the Farm.

 

The problem is that when the code was updated to change some of the charms a good percentage of users are not getting them on the screens.   Around 60-70% of the users see the old charms in IE, and around 10% of the users see the old ones in Chrome.

 

Most of you are thinking "Duh, clear your cache".  Unfortunately it's not that easy.  We have users clear their cache/wipe history and no change.  We have them do Control F5, no change.  Reboots, restarting browsers doesn't do anything either.  The users still get the old charms.  

 

We even thought it might be something on the server end, so we used hosts files to have the users point to specific WFE's, (and bypassing the load balancer), but still no luck.

 

You want to know how we fix it?  (The symptom at least).  We have a user press F12, and then reload the site and step through it.  Once it reloads the page that way then it works fine from then on for that user.   Crazy huh?  We discovered that purely by accident.  The problem is that we can't tell thousands of users around the world to do that.  (We'd get hundreds of calls to the service desk, if not thousands).  Right now the only reason no one is calling is because none of them realize that the charms are supposed to have changed.

 

Here is the code for the charms, (slightly modified to remove internal URL's)

               // Links for Top Left "Home"

               $('#suiteBar div div .ms-verticalAlignMiddle').first().prepend('<div class="SiteIcon"> \

               <a target="_parent" href="http://sam.toro.com/" title="Home"><i class="fa fa-home"></i></a> \

               <a target="_parent" href="http://sam.toro.com/en-us/resources/my-info-services/" title="Information Services"><i class="fa fa-laptop"></i></a>\

               <a target="_parent" href="http://sam.toro.com/en-us/news/Pages/Company-Calendar.aspx" title="Company Calendar"><i class="fa fa-calendar"></i></a> \

               <a target="_parent" href="http://sam.toro.com/sites/ent-search/Pages/peopleresults.aspx?" title="People Finder"><i class="fa fa-user"></i></a> \

               <a target="_parent" href="http://sam.toro.com/en-us/resources/globalservices/Pages/EHS-Location-Resources.aspx" title="Safety"><i class="fa fa-medkit"></i></a> \

               <a target="_parent" href="https://toro.cherwellondemand.com/cherwellportal/hr/SAMLloginxyx.com etc" title="HR Connect"><i class="fa fa-users"></i></a> \

                              <div id="FavWrapper"> \

                                             <a target="_parent" href="javascript&colon;favAddLink();" title="Favorites"> \

                                             <i class="fa fa-star"></i>\

                                             </a> \

                                             <table class="FavDropdown">'+favLinks+' \

                                             </table> \

                              </div> \

                              \ </div>');

 

We been using this code for a couple years now and in the past it updated just fine.  We can't figure out why that would have changed, or any pattern between the users it's working for and the ones it's not.  For example some Win10/Edge users have the new charms, others get the old ones.  Same with Win7.  Some corporate users have new and  others the old, and some remote users have the same.  We can't come up with any kind of GPO that would have affected this.

 

We are really stuck on why the flushing the cache and the Ctrl-F5 are not working right.  The fact that it isn't working on either Chrome or IE is wierd.  At first we thought it was just an IE issue, then we started discovering some chrome users weren't updating either.

 

We are kind of stuck, and HR really wants us to get the updated charms rolled out corporate wide soon.  We are trying to think of a way to force the F12 thing to happen via a GPO or something like that that we can push to every computer, but so far we haven't figured anything out that will work.

 

Any suggestions would be GREATLY appreciated.

Ted

 

8 Replies

    • Ted McLaughlin's avatar
      Ted McLaughlin
      Brass Contributor

      Unfortunately no luck.  I checked both WFE's for that farm and they both say:

      enabled="false"

       

      At the end of the line in the config file.

       

      Ted

      • Trevor Seward's avatar
        Trevor Seward
        MVP
        When you run Fiddler on the client, are you seeing HTTP 304's on the content?

Resources