Flymedia Technology: Being a web developer, you need to fix loads of errors on the website. If you have started with web development, then gradually you need to learn how to fix them. This is the reason, it is always suggested to get the website developed from the expert team of Website Designing Company. The experienced and skilled team is well-aware of how to handle the errors. In this blog, our experts have shed light on the “Page has broken JavaScript” error in Site Audit.
What is the reason for this error?
The issue is regarding those pages which have link JavaScript file URLs. They return the 4xx or 5xx HTTP status codes to the crawlers. The image files are referred to broken images.
Why is it important?
Search engines and browsers will not render Broken JavaScript files. It is not going to make any changes to the website. JavaScript files are supposed to create the content and it will not get the index through the search engine.
How is it fixed?
First of all, you need to check the linked java scripts column for the code status. Here are some of the common HTTP status codes, which you will find are:
- 404 (Not Found) HTTP status code
Through this state code, it tells that the file is either deleted or moved, although the link is the same. To correct this error, you need to get back the JS file with the old URL. After that, make changes to the link which helps to point it to the right file. Another option is to remove the link from the JS file so that the file is not needed on that page.
- 403 (Forbidden) HTTP status code
Through this state code, it states the crawler did not get permission to use the JS files. The server may be blocking all the requests which are coming from the crawler at some time during the crawl. In some instances, it can happen when the JS files are present on the external severe and this blocks the crawler.
It is possible that it happened due to firewall or server configuration. To address this issue, including the IP addresses in the white list. Once this is done, run a new crawl.
- 429 (Too Many Requests) HTTP
Through this status code, it tells that the speed for the crawl setting gets too high for the severe. From the setting, reduce the crawl speed and then run the project again.
- 5xx (Server error) HTTP
This status code indicates that the server has different issues. Due to this, the server gets overloaded, slow, or misconfigured. In such a situation, you need to inform the hosting provider or developer.