JavaScript seems to be disabled in your browser - Magento

JavaScript seems to be disabled in your browser - Magento

July 19, 2026 · Illustrated author avatarBy Stefan Bogdanescu
JavaScript seems to be disabled in your browser - Magento

Solving JavaScript Disabled Warnings on Magento Sites

When sharing your Magento site on social media platforms like Facebook, you may encounter a frustrating “JavaScript seems to be disabled in your browser” warning. This can happen even if your system configuration is set correctly within the Magento admin panel.

Understanding the Problem

The warning typically appears because of how Magento’s browser capabilities detection feature works. When sharing your site on social media, the platform’s servers don’t execute JavaScript client-side. Instead, they render the page server-side and serve a static version to users who click through. If that version doesn’t contain the necessary JavaScript elements, you’ll see this warning.

The Incorrect Approach

The common misconception is that adjusting the settings under “System -> Configuration -> Browser Capabilities Detection” should resolve the issue:

  • Redirect to CMS-page if cookies are disabled = No
  • Show notice if JavaScipt is disabled = No

However, these settings only affect visitors accessing your site directly and don’t apply when links are shared on external platforms.

The Correct Solution: Meta Tags for Social Sharing

To fix this, you need to ensure that the social sharing previews are generated properly. This involves adding specific meta tags to your theme’s layout files.

  1. Locate your theme’s layout file: By default, Magento places these under app/design/frontend/<package>/<theme>/Magento_Theme/templates/html/head.phtml.

  2. Add the necessary meta tags:

<meta property="og:title" content="<?php echo $this->getPageTitle(); ?>" />
<meta property="og:description" content="<?php echo strip_tags($page->getMetaDescription()); ?>" />
<meta property="og:url" content="<?php echo $block->getBaseUrl().$block->getRequest()->getPathInfo(); ?>" />
<meta property="og:image" content="<?php echo $this->helper('Magento\Catalog\Helper\Image')->getDefaultPlaceholderUrl('image'); ?>" />

These tags provide the necessary information for social media platforms to preview your site properly, including the title, description, URL, and an image.

  1. Clear cache: After making these changes, make sure to clear your Magento cache (bin/magento cache:clean) or use a caching plugin like Varnish or Redis to ensure the updated layout is served.

A Note on Third-Party SEO Extensions

If you’re using third-party extensions for SEO purposes (like Amasty’s SEO Suite Ultimate), make sure they are correctly configured. Sometimes, these extensions can override default meta tags and cause similar issues.

Conclusion: Resolving the Warning Once and For All

Remember, this warning is not a Magento bug but rather a limitation of how social media platforms render shared links. By adding the necessary Open Graph meta tags to your theme’s layout file, you ensure that social sharing previews are generated correctly, eliminating the “JavaScript disabled” warning.

For more in-depth guides on optimizing your Magento site for search engines and social sharing, check out Laravel Company. We provide expert consultations and custom development services to help you make the most of your e-commerce platform.

Themes Admin Configuration SEO

Our network