Can I change the page's HTML status code on the client side?
问题 I have a static HTML web page and I want to set its status code to 404 "Not found". But, I want to do this using javascript or jQuery, not any server side language. How can I do this on the client? With javascript or maybe a <meta> tag? 回答1: It is impossible to set the HTTP Response code using client side programming. 回答2: I think the sense behind this exercise is the following: You want to load a page that displays a custom error message to your users. At the same time you want to tell your