[SalesForce] the best way to manage javascript resources for Visualforce pages

So at the moment when I want to make a quick tweak in a javascript file that enhances a Visualforce page, I have to go:

  1. Setup >> Development >> Static Resources
  2. Find my script in the list
    (takes a few clicks and page refreshes if it is low down on the
    list)
  3. Click Delete I get a list of places where the resource is used
  4. Open the pages mentioned in the code editor
  5. Comment out the places
    where the script is used
  6. Find the resource in the list again and try
    delete (almost there, don't give up now)
  7. Now add that missing angle bracket in my desktop editor
  8. Upload the file giving it the same name as before
  9. Hop over in to the
    online code editor and remove the comments around all the places
    where the script is included and save.

Anyone know of a shorter routine?

Best Answer

You can just reupload the zip file again, no need to delete & reinsert. Simply click "Edit" and use the file upload field :)

And during development I tend to work on raw JS files (not zipped), I can then edit code directly in Eclipse IDE for example. I package up zips only when I'm ready to promote it to testing / production. You could reference both the "basic" static resource and later temporary static res with just this one troublesome JS file, if it contains function definitions they'll be overwritten.

Related Topic