Page freezes while writing code or trying to submit exercise

Hi to all!
I’m having an issue with codecademy. It’s been a while since I’ve used the website, so I don’t know if the problem is due to a change that has been done in the past months, or if it’s related to me.

It happens a lot that when trying to submit an exercise the cog wheel keeps running but without doing nothing.
I think that it may be due to the “real time” checking of the code (now I’m doing the PHP course, so everything that I wrote is instantly checked in the little preview screen on the side of the page), after some lines of code this freezes and stop checking, and then when I press “submit” the cog starts to run but does nothing. In fact, the only workaround that I found is to copy all the code of the page, reload the page with the browser button, paste the code and then click the submit button. And it works.

But obviously it is a really annoying behaviour because it keeps happening almost in every lesson and I’m spending more time in reloading the pages and copy/pasting the code rather than actual writing code for the exercise.

I’m on a macbook, and this same behaviour is both with Safari and Chrome browsers. It’s not loop related, it happens in almost every lesson where I need to write code.

Is there a way to turn off the instant check of the code, so that it actually check for errors only when submitting the page? I know that it’s an useful feature when dealing with HTML, CSS and other web development related subjects, but in this case it’s really annoying and slows down the utilisation of the website.
Or maybe is there something else I can do to prevent this behaviour from happening? Like update a plugin of the browser or similar.

You could use the opening <?php as last added code-line
therewith post-poning the peer-to-peer php communication…

Hi, thank you for answering me. Sorry for the delay, but I wasn’t able to try this in the past days.
I’m doing as you’ve suggested but it appears that it’s still happening, even if it’s less common than before.