What is a script?
A script is a piece of code that performs a specific function. When a script is mentioned on the Internet, it is usually JavaScript that is referred to. 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 in on a website.
The JavaScript can be run either through 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 Google to do so, as it requires more effort for the search engine. That's why we recommend that you avoid using JavaScript to display important content on your website wherever 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 your content is being displayed or not, in case Google is not reading your JavaScripts.
What is a script error?
Most scripts work without any problems. But like anything else, it's rare that a JavaScript will report an error via an error message that pops up on the screen.
Script errors can show up in the eyes of Internet users if their Internet application is set to block scripts. In such cases, the error will be seen on several different websites, as this setting will block all of them.
If users have not set their Internet program to block scripts, then the error is more likely to be that one or more scripts on a specific site are having problems. The cause of the error can be many, and it will not always be easy for programmers to know what types of errors can occur. For this, the programmer can usefully put the script into a debug mode, which can help identify the error and provide information on how to fix it.
Read more about technical SEO.
Frequently asked questions
What is a script?
A script is a piece of code that can perform a specific function on, for example, a website.
What is a script used for?
A script can be used for many things. For example, it can be used to collect visitor statistics on a website.
Are scripts dangerous?
As a rule, scripts are not dangerous. But hackers can inject so-called malicious scripts into a website, compromising security.
What is a scripting language?
A scripting language is a system of codes and rules used for programming. Examples of scripting languages are JavaScript and PHP.