HTML, CSS, JS Error Pages
Galamphin (101)

Say you created a new repl called, (I know this wouldn't be possible, it's just an example), and in the repl you created multiple HTML files, eg. index.html, about.html, hello.html ect.

If you typed in it would take you to that page.
So, I was thinking it would be really cool if you could make your own customised error page, not just the one that pops up made by repl.

So if you typed in instead of it taking you to this page:

It takes you to a custom error page, designed by you!

You are viewing a single comment. View All
Answered by PYer (2685) [earned 5 cycles]
View Answer
TheDrone7 (730)

Although you can already do it if you make your own backend using node.js or python or any other backend language.

PYer (2685)

@TheDrone7 Can you give me an example?

TheDrone7 (730)

@PYer, you can see there I have defined my own custom error page. I'm not quite sure how I would do that in python but pretty sure you can do that.

Galamphin (101)

@TheDrone7 that's really clever! I'm not very experienced with JS, so how would you implement that to a HTML,CSS,JS setup?

TheDrone7 (730)

@Galamphin I believe you won't be able to achieve that if you stick to frontend, also, I believe that itself uses my technique for showing the error page. You can always easily get started with js here. And as for the backend version (or node.js) you can click here.

coderash (68)

@TheDrone7 , could you tell me the code for a JS error page?

Galamphin (101)

@TheDrone7 could you specify were in the code the error page code is?

TheDrone7 (730)

@Galamphin it's inside the views directory, the layout page has the main layout and the error file had the content to be displayed on the error page.