Hi,
The Paypal advanced in "iframe" mode display an iframe in your website.
An iframe is a website in another website ; so you're displaying the paypal website (for the payment) in a part of yours.
What the iframe is doing does not impact the rest ; an iframe does not communicate with his parent (and the parent can't communicate with the child).
So, when the order is confirmed in paypal, there is no way for your website to know it (using javascript or something else).
The page in your website is not refreshed ; I really don't see how it would be possible to refresh and empty the cart dynamically. The only solution is that the iframe open a thank you page which will redirect/refresh the parent to a confirm page.
About the 404 ; it will be useful to know the page which has been asked.
It is supposed to redirect you to your url ; but we have to know which url is used instead. Because if you got a 404 page, it means that the url is not the right one.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.