Using boilerplate

Just getting started here and I made a very basic boilerplate but when I pasted it into the Cat blog project it shutdown/crashed. I went back through starter info and did a quick search but I am asking here as well… are we not allowed to use boilerplate in the exercises? or is the crash a fluke… I am reluctant to try a second time in case it is a no no. Thanks for any help!

Please share your code here

I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

Is it the cat photo app project you are doing?

https://www.freecodecamp.org/learn/2022/responsive-web-design/learn-html-by-building-a-cat-photo-app/step-1

The steps have very specific seed code and you need to only make changes that the instructions specify. If you make other changes, it will not pass the test.

Change the text of the h1 element below from Hello World to CatPhotoApp and watch the change in the browser preview.

You can see that adding your boilerplate isn’t going to accomplish this task. It could have unforseen results. It shouldn’t crash or shutdown your browser but it’s not necessary.

nope, couple down from that… make a cat blog. It didn’t crash my browser, it killed the editor window on the project and sent me back out to the curriculum screen.

Ok… I went ahead and tried it again and it didnt have an issue this time…

1 Like

Perhaps a silly question, and I am ASSUMING that the answer is yes, but if for some reason I close, lose connection or shutdown while in a coding exercise, my progress to that point is saved server side?

There are two different types of saved progress for Free Code Camp: your profile and your browser cache.

A list of your completed challenges is saved to your account in the FCC database. You can see the list of completed challenges by looking at your public portfolio. With a growing curriculum already over 1,400 lessons and a community of millions of people, FCC does not store every solution to every challenge in its database. When you complete a challenge, there is a modal that gives you the option to download your solution. This gives you the option to save a copy of any solution that you may want to reference later. There are some challenges which are classified as projects required for certifications. Your solutions to those can be viewed on your settings page.

Your in-editor code is saved in your browser’s local storage. Recent in-progress code from the challenge editor is also saved in your local browser cache when you run tests. If you are completing lessons and do not see your recent code, then your local storage has been cleared or something is preventing FCC from writing to your browser’s storage. This could be a browser setting, a privacy extension, or a browser version incompatibility. Especially as you get to more complicated challenges that may take multiple sessions, I strongly recommend saving your in-progress work outside of the browser cache.

This is a good opportunity to learn the ins and outs of your GitHub account, but you can also just save locally or use a service like repl.it which allows for versioning.

Thank you for the response… if I save it and then lose the cache will it allow me to paste the code back into the exercise? I ask because I tried to paste a simple boilerplate into the cat blog and it reset/crashed the editor…

what did you try to paste in there? pasting in the editor should not be a destructive action

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
   
    <title>Your Page Title</title>
 
</head>
<body>
    <!-- Your content goes here -->
    <header>
        <h1>Website</h1>
    </header>
    <main>
        <section>
            <h2>About</h2>
            <p>something interesting.</p>
        </section>
       
    </main>
    
</body>
</html>

and what happens when you paste this into the editor?

the first time I tried? it closed the editor out and dropped me back at the curriculum screen. I tried it again and it worked.

As mentioned in the other thread - you shouldn’t paste code that’s not related to your current Step into the editor.

that’s not a behavior I have ever heard of

1 Like

If you are able to get this behavior to happen consistently, please create a GitHub Issue with the steps to reproduce the bug.