html - Custom 404 error without server -


Is it possible to stop a 404 error without using a web server (the browsing file in the file system)?

I tried with some javascript, using a hidden iframe which preloads the destination page and checks the result and then triggers custom error or redirects to the correct page

This work is fine, but not good on sophistication.

A 404 error is an HTTP status response. So unless you are trying to retrieve this file using an HTTP request / response, you can not have a real 404 error as you suggest, just like you do the only thing Can copy. Any "standard" method of handling a 404 error depends on your taste of the web server ...


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -