Dont bother deleting the temp file, it will be deleted automatically on calibre shutdown, as long as you create it with the PersistentTemporaryFile function.
I don't think a lot of people disable javascript and if they do, then most likely the other approach will fail for them as well, so I would suggest sticking with your method if you're happy with it.
|