Page 1 of 1

Can you allow scripts only on their own domain?

Posted: Sat Feb 04, 2012 6:59 pm
by w1res
Hey everyone,

I've been using noscript for a while, and I've been wondering. Can you block scripts from google.com everywhere EXCEPT if the website you are on is google.com? This would allow me to use google websites like maps.google.com without having to worry about tracking across other websites.


Thanks!

Re: Can you allow scripts only on their own domain?

Posted: Sat Feb 04, 2012 9:01 pm
by Giorgio Maone

Re: Can you allow scripts only on their own domain?

Posted: Sat Feb 04, 2012 9:39 pm
by w1res
Thanks for the reply. I looked at the faq but I can't seem to get it to work. I tried to do this code to test if it works, and it seems like facebook is still loading javascript when I go there with this in the ABE. From what I understand, that code should only allow facebook.com script to load from test.com.

# facebook rule
Site facebook.com
Accept from test.com
Deny

Site fbcdn.com
Accept from test.com
Deny

Re: Can you allow scripts only on their own domain?

Posted: Sat Feb 04, 2012 9:58 pm
by Giorgio Maone
w1res wrote:T. From what I understand, that code should only allow facebook.com script to load from test.com.
... and from the chrome (bookmarks and address bar).

Furthermore, if you want to include facebook.com (and you should, since most stuff comes from www.facebook.com) you should use ".facebook.com" (notice the leading "."), which is shorthand for the combination "facebook.com *.facebook.com".

Re: Can you allow scripts only on their own domain?

Posted: Sat Feb 04, 2012 10:37 pm
by w1res
Alright. I tried adding the "."

# google rule
Site .google.com
Accept from test.com
Deny

But now ABE seems to block the entire page from loading!

Re: Can you allow scripts only on their own domain?

Posted: Sat Feb 04, 2012 10:56 pm
by Giorgio Maone
I'm not sure about what you're trying to accomplish exactly, but I believe the following pretty much covers the original post:

Code: Select all

# google rule
Site .google.com .gstatic.com
Accept INC from .google.com .gstatic.com .googleapis.com
Deny

Re: Can you allow scripts only on their own domain?

Posted: Sat Feb 04, 2012 11:17 pm
by w1res
Thanks.

Basically, 90% of the websites that I go to are running either a "facebook.com" or "google.com" script on them due to "like" buttons and stuff. Google has even said that they try to track you across multiple sites and connect the profiles. I'm sure facebook does the same. The thing is, I like to sometimes use google services such as gmail or google maps. That makes it annoying to always have to "temporarily allow" the scripts when I go to those sites.

This way, if I am on a Google site, it allows the scripts. But if I am on a different website, the google scripts won't load.