SharePoint 2010: Ribbon CustomActions

Developing a CustomAction for the Ribbon and SharePoint 2010? If you’re like me – you follow some instructions online, deploy it once to verify it works, then change as needed and redeploy. One catch though – the data needed for the ribbon custom action to work is fetched by the browser and CACHED! So you won’t see your changes…until you clear your cache. Stupid but true. You’re welcome.

One thought on “SharePoint 2010: Ribbon CustomActions

  1. Georg Schramm

    You are very right with that caching issue. Well, SharePoint has a solution for this for its own(!) library references.

    Call any SharePoint page, peek into the source code and search for the HTML script tags which load external Javascript files, e.g. “init.debug.js” or “datepicker.debug.js”. You will see that the SRC attributes have additional parameters like “?rev=4FrmHkiH0XlWZfpqgIaqEwxs” to every link to Javascript files.

    Why? Because this is the ‘trick’ so the client browser ALWAYS loads the newest version of the Javascript file from the server and not from the local browser cache!

    And now the trouble maker is, that YOU just have to do the exact same for your custom script links in your Ribbon definition, so that YOUR custom file is also fresh loaded from server and not from cache.
    But how??? No solution for this. :-(

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>