Topic: Refresh/reload an external js file?

My rails app currently writes js code to a file. I have button to press reload. I could have it refresh the page, but id rather it just reload the js file. Is there a way i can refresh the current tag? I know i could create a new one with the src file path, but id prefer not to keep appending script tags.


Re: Refresh/reload an external js file?

Scratch that, figured out a solution. I was using content_for to load the script file into the head tag. Instead i created a div with an id, and put the script tag inside there, inside the body. Then I used javascript to create a new script tag with the source attribute set, and set the innerhtml of that div to the new script tag.