If you want to add functionality to your web browser, you have the option to install extensions - or add-ons and plugins as some browsers call them - or userscripts usually.
Extensions are small programs that are loaded at the start of the web browser while userscripts only become active on the pages they have been designed for.
That is the biggest and most important difference between those two but there are other. Extensions are offered from official repositories such as the Chrome Web Store or Mozilla AMO, and scripts on third-party sites.
Lets look at an example on the main difference between extensions and scripts. Lets say you are a big Facebook user and want to improve your experience on the social networking site by adding features and shortcuts to it.
Facebook Fixer is a userscript that might offer exactly what you are looking for. It can do all sorts of things like displaying bigger album pictures and photos, showing age information and signs, enabling keyboard shortcuts or automatic reloads on page errors.
A similar functionality is also provided by extensions like the Better Facebook Fixer extension for Google Chrome. It basically offers the same functionality as the userscript but with a small but noticeable difference.
I'm using Google Chrome for the example because it offers a task manager that lists the memory usage of all open tabs and extensions.
If you install the extension you notice that it uses about eight Megabytes of computer memory constantly. It runs in the background all the time even if you are not on Facebook or don't have a single website open in Chrome.
The userscript on the other hand will only run when you visit Facebook.
It can generally be said that userscripts are more resource friendly than extensions. The situation is a little bit different for Firefox users who have to install an extension to use userscripts, and for scripts that require an extension like Tampermonkey in other browsers such as Chrome.
But it is beneficial for them as well if we assume that the extensions will likely use a similar amount of computer memory meaning it is a tie if only one userscript is installed and an improvement if you install more than one.
This theory obviously only works if the extension and userscript offer similar functionality.
There are a couple of other differences. Extensions may offer preferences or options that you can control from a manager that the browser ships with, while userscripts may require manual edits or provide you with options to change options when you visit one of the supported sites.
Last but not least, it is necessary to talk about security. User scripts are not inherently less secure than extensions but they don't get reviewed like extensions would. While extension stores accepted listings for malicious or problematic extensions in the past, it is more Wild West when it comes to scripts.
User scripts are very useful when it comes to changing content on websites that you visit frequently or regularly, and there is nothing wrong in using them if you take the time to go through the code to make sure that they are clean and not malicious or otherwise problematic.
What do you prefer to use: Extensions or userscripts?Advertisement
Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.
We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.
If you like our content, and would like to help, please consider making a contribution:
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.