Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Fix JavaScript Void 0 Error in Chrome

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

The javascript:void(0) error in Chrome usually appears as a blank page or a message like "javascript:void(0)" in the address bar when you click a link or button. This happens because the link is coded to run JavaScript that returns undefined, but something is blocking that script from executing — often an ad blocker, an extension, or a corrupted browser cache. Here's the shortest fix: try disabling extensions, clearing cache, or updating Chrome. Below are the detailed steps.

What You'll Need

  • A Windows, Mac, or Linux computer with Chrome installed
  • Access to Chrome's settings (no admin rights needed)
  • Optional: another browser (like Edge or Firefox) for testing

Step-by-Step

  1. Reload the page. Press F5 or click the refresh icon. Sometimes the error is a one-time glitch.
  2. Check if the error happens in another browser. Open the same page in Edge or Firefox. If it works there, the problem is Chrome-specific. If it fails everywhere, the website itself is broken.
  3. Disable Chrome extensions.
    1. Click the three-dot menu (top-right) > Extensions > Manage Extensions.
    2. Toggle off all extensions, especially ad blockers, script blockers, or privacy tools.
    3. Reload the page. If it works, re-enable extensions one by one to find the culprit.
  4. Clear browser cache and cookies.
    1. Click the three-dot menu > Settings > Privacy and security > Clear browsing data.
    2. Choose All time in the time range.
    3. Check Cached images and files and Cookies and other site data.
    4. Click Clear data. This will log you out of websites, so you'll need to sign in again.
  5. Update Chrome.
    1. Click the three-dot menu > Help > About Google Chrome.
    2. Chrome will automatically check for updates and install them. Relaunch Chrome when prompted.
  6. Reset Chrome settings. This restores defaults without deleting bookmarks or passwords.
    1. Go to Settings > Reset settings > Restore settings to their original defaults.
    2. Click Reset settings to confirm.
  7. Run Chrome's built-in cleanup tool. (Windows only)
    1. Go to Settings > Advanced > Reset and clean up > Clean up computer.
    2. Click Find and let it scan for harmful software.
  8. Reinstall Chrome. As a last resort, uninstall Chrome (your bookmarks and passwords can be synced if you're signed in), then download a fresh copy from google.com/chrome.

Common Mistakes

  • Disabling JavaScript entirely. Some users try to fix this by turning off JavaScript in Chrome settings, but that breaks many websites. The error is not caused by JavaScript being disabled; it's caused by something blocking a specific script.
  • Clearing only cache, not cookies. If you only clear cached images, the corrupted cookie that causes the error may remain. Clear both together.
  • Assuming the website is broken. The error often appears on a few sites, not all. Test on other sites first.
  • Using a third-party "cleaner" tool. These can delete important Chrome files and make things worse. Use Chrome's built-in tools.

Tips

  • Use Incognito mode to test. Open the page in a new Incognito window (Ctrl+Shift+N or Cmd+Shift+N). Extensions are off by default there. If it works, an extension is the cause.
  • Whitelist trusted sites. If an ad blocker is the culprit, add the site to its whitelist instead of disabling the blocker entirely.
  • Check if the link is truly a javascript: link. Right-click the link and copy the address. If it starts with javascript:, it's designed to run code. Some sites use this for legitimate buttons, but if the code fails, you get the error.
  • Keep Chrome updated. Older versions have bugs that are fixed in newer releases.

Troubleshooting

If you've done all the steps and the error persists:

  • Check if the error is on a specific site. If it's only one site, the site's code may be outdated or incompatible with your Chrome version. Try a different browser; if it works there, contact the site's support.
  • Look for a Chrome flag that might be interfering. Go to chrome://flags, click Reset all to default at the top-right, then relaunch Chrome. This resets experimental features that might cause issues.
  • Check for malware. Run a full system scan with your antivirus software. Some malware modifies Chrome's shortcuts or injects scripts that cause this error.
  • Create a new Chrome profile. Go to your profile icon (top-right) > Add > create a new profile. Test the page there. If it works, your old profile is corrupted. You can migrate bookmarks by exporting them.
  • If nothing works, use a different browser temporarily. The error is not dangerous, but if it blocks important tasks, switching to Edge or Firefox is a practical workaround while you investigate.

Frequently Asked Questions

What does javascript:void(0) actually mean?

It's a JavaScript expression that returns undefined. It's often used in links to prevent the page from navigating while still allowing the JavaScript to run. When you see it as an error, it means the script didn't execute properly.

Is this error a security risk?

No. It's a technical glitch, not a virus or hack. However, if you see it on a site you don't trust, close the tab and don't click suspicious links.

Will clearing my cookies log me out of everything?

Yes, clearing cookies will log you out of most websites. You'll need to sign in again. That's why it's often a last resort before resetting Chrome.

Why does it happen only on certain websites?

Those sites likely use JavaScript for buttons or forms. If their code conflicts with an extension or a cached version of the page, the script fails. It's not a Chrome-wide issue.

Can I prevent this from happening again?

Keep Chrome updated, avoid installing too many extensions, and periodically clear your cache. Also, avoid clicking links that start with javascript: unless you trust the site.

Does this happen on mobile Chrome?

Yes, but it's less common. On Android or iOS, the same steps apply: clear cache, disable extensions (mobile Chrome supports extensions on Android), or update the app. On iOS, extensions are limited, so clearing cache usually helps.