Eu imagino que você obterá um ganho de desempenho quando configurar o nginx explicitamente que a localização do javascript antigo não é mais válida, já que o nginx não precisará mais verificar o sistema de arquivos, e quando você enviar um erro 410 ele ganhará Não é necessário enviar a página de erro 404:
location /path/to/script.js {
return 410 ;
}
Código de status HTTP 410: ido
The requested resource is no longer available at the server and no forwarding address is known. This condition is expected to be considered permanent. Clients with link editing capabilities SHOULD delete references to the Request-URI after user approval. If the server does not know, or has no facility to determine, whether or not the condition is permanent, the status code 404 (Not Found) SHOULD be used instead. This response is cacheable unless indicated otherwise.
The 410 response is primarily intended to assist the task of web maintenance by notifying the recipient that the resource is intentionally unavailable and that the server owners desire that remote links to that resource be removed. Such an event is common for limited-time, promotional services and for resources belonging to individuals no longer working at the server's site. It is not necessary to mark all permanently unavailable resources as "gone" or to keep the mark for any length of time -- that is left to the discretion of the server owner.