What is a script?
A script is a piece of code that performs a specific function. When people talk about a script on the internet, they are usually referring to JavaScript. JavaScript is the most widely used scripting language on websites and all web browsers support it. For example, JavaScript can be used to validate a form that you have filled out on a website.
The JavaScript can either be executed via the browser or on the web server. Other scripting languages include: PHP, AppleScript, CGI script, ECMAScript, JScript, VBscript, VRML and Visual DialogScript.
Example of a script. We use the script on the website to display a pop-up.
How do my scripts affect my SEO?
Google can read scripts, but you shouldn't expect it to do so as it requires more effort for the search engine. Therefore, we recommend that you avoid using JavaScript to display important content on your website as much as possible. You can use a browser plugin such as Web Developer for Google Chrome to see how your website is displayed when JavaScript is disabled. This allows you to check whether or not your content is being displayed in case Google is not reading your JavaScript.
What is a script error?
Most scripts work without a hitch. But like anything else, it's rare that a JavaScript reports an error via an error message that pops up on the screen.
Script errors can appear to users on the internet if their internet program is set to block scripts. In such cases, the error will be visible on several different websites, as this setting will block all of them.
If users have not set their web application to block scripts, the error is more likely to be that one or more scripts on a specific website are having problems. The cause of the error can be many, and it's not always easy for programmers to know what types of errors can occur. For this, the programmer can put the script into a debug mode, which can help find the error and provide information on how to fix the error.
Read more about technical SEO.
Frequently asked questions
A script is a piece of code that can perform a specific function on a website, for example.
A script can be used for many things. For example, it can be used to collect visitor statistics on a website.
In general, scripts are not dangerous. But hackers can inject so-called malicious scripts into a website and compromise security.
A scripting language is a system of codes and rules used for programming. Examples of scripting languages are JavaScript and PHP.