Gatsby pages with 'adwords' in slug do not work when AdBlock is active
See original GitHub issueDescription
It seems that any pages with the word ‘adwords’ in the url do not work with the Google Chrome AdBlock extension active. I have not experienced this issue with any other page slugs before. I have tested this on a new Gatsby project using gatsby new
and created a page at /adwords/ and /adwords/remarketing/ and both pages break. The error in the console says:
Failed to load resource: net::ERR_BLOCKED_BY_CLIENT http://localhost:<port>/page-data/adwords/page-data.json:1
and
Failed to load resource: net::ERR_BLOCKED_BY_CLIENT http://localhost:<port>/page-data/adwords/remarketing/page-data.json:1
So it seems that the browser is unable to get the page json data because the filename has ‘adwords’ in it. Not sure if this is a bug that is preventable, but would be great if this was fixed.
Steps to reproduce
- Create a new Gatsby project using
gatsby new <projectname>
- Create a page in the src/pages folder named adwords.js
- Create a subfolder in the src/pages folder titled adwords and create a file inside named remarketing.js
- Add page content to both and run
gatsby develop
Expected result
Pages should work normally, and display the content.
Actual result
Pages are broken. Errors in console:

Environment
System: OS: macOS 10.14.5 CPU: x64 Intel® Core™ i7-6567U CPU @ 3.30GHz Shell: 3.2.57 - /bin/bash Binaries: Node: 11.6.0 - /usr/local/bin/node Yarn: 1.12.3 - /usr/local/bin/yarn npm: 6.6.0 - /usr/local/bin/npm Browsers: Chrome: 75.0.3770.142 Firefox: 68.0 Safari: 12.1.1 npmPackages: gatsby: ^2.13.39 => 2.13.39 gatsby-image: ^2.2.6 => 2.2.6 gatsby-plugin-manifest: ^2.2.4 => 2.2.4 gatsby-plugin-offline: ^2.2.4 => 2.2.4 gatsby-plugin-react-helmet: ^3.1.2 => 3.1.2 gatsby-plugin-sharp: ^2.2.9 => 2.2.9 gatsby-source-filesystem: ^2.1.6 => 2.1.6 gatsby-transformer-sharp: ^2.2.4 => 2.2.4 npmGlobalPackages: gatsby-cli: 2.4.3
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (5 by maintainers)
We might be able to workaround this by maintaining dictionary of blacklisted adblocker words or hash path segments, but to be honest I’m not sure we should. This would add overhead to gatsby runtime and to me it really seems like overzealous adblocker rule to block resources that contain “ad” in them (but not being actual ad)
I had to stop using the prefetching (<Link> stuff). Sad but this was the most pragmatic decision.
That said, ideally, we would disable it only when detecting ad blockers. Maybe I’ll look into that in 2021.
JP Boily
Founder @ Metrics Watch ( https://metricswatch.com/?utm_source=jp&utm_medium=gmail-signature )
Metrics Watch is a reporting software tailored to Marketing Agencies, allowing them to automate their client reporting in a beautifully designed, mobile-first, email-based solution. Clients get regular, actionable data on their marketing spend, allowing the Agency to focus on what they do best.
On December 19, 2020 at 11:14 AM, Rasmus Wølk (notifications@github.com) wrote: Hi @jipiboily ( https://github.com/jipiboily ) & @chungeric ( https://github.com/chungeric ) I’m experiencing the same issue – did you by any chance figure out a clever workaround? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub ( https://github.com/gatsbyjs/gatsby/issues/16104#issuecomment-748493637 ), or unsubscribe ( https://github.com/notifications/unsubscribe-auth/AABY4IIN2KTX2NCCL6NVNCTSVTGPNANCNFSM4IG7KPLQ ).