I wish I could do that on macOS so I stop getting hit with pop ups in Safari asking me for my location. Homedepot.com is particularly annoying about this.
Use a browser that doesn't purposely nag you for permissions like Safari does. Firefox fits the bill for me, and doesn't throw nagging pop ups at me all of the time.
It does not stop the pop ups. Safari asks from you permission for location services, you tap ok, and you get an error message that says getting location services failed.