# Effective Techniques for Protecting the Privacy of Web Users
## 4 Methodology
### Data Collection  
For the crawl of the most 50 websites, We simulate the experience of browsing websites on a device using Selenium webdriver [24], a toolset that allows us to retrieve all elements of a DOM tree (a rendered HTML page). Using Python scripts and a connector for the most popular web browsers, we automated Firefox browsing to download websites automatically. During the crawling process, our crawler waits 100 s for each target website to be loaded.  
\begin{table}
\begin{tabular}{r r r} \hline
**No.** & **The Website** & **Category** & **Total Sites Linking** \\ \hline
18 & www.telegram.org & 16,015 \\
19 & www.mbc.net & 644 \\
20 & www.haraj.com.sa & 342 \\
21 & Amazon.sa & 359 \\
22 & www.ar.aliexpress.com & 28,093 \\
23 & www.amazon.com & 709,590 \\
24 & www.microsoft.com & 771,705 \\
25 & www.almubasher.com.sa & 53 \\
26 & www.office.com & 100,406 \\
27 & www.noon.com & 553 \\
28 & www.microsoftonline.com & 13,309 \\
29 & www.myshopify.com & 104 \\
30 & www.salla.sa & 286 \\
31 & www.apple.com & 1,313,163 \\
32 & www.github.com & 303,583 \\
33 & www.zid.sa & 33 \\
34 & www.jarir.com & 279 \\
35 & www.ilovepdf.com & 1857 \\ \hline
36 & www.absher.sa & 160 \\
37 & www.iam.gov.sa & 40 \\
38 & www.gosi.gov.sa & 128 \\
39 & www.mc.gov.sa & 60 \\
40 & www.qiwa.sa & 23 \\
41 & www.najiz.sa & 25 \\
42 & www.mol.gov.sa & 175 \\
43 & www.hrsd.gov.sa & 201 \\ \hline
44 & www.wikipedia.org &
\begin{tabular}{l} Dictionaries and \\ Encyclopedia \\ \end{tabular} & 1,409,659 \\ \hline
45 & www.canva.com & Online Designs & 43,407 \\ \hline
46 & www.alinima.com & Banking & 74 \\
47 & new.alahdineline.com & 34 \\ \hline
48 & www.moe.gov.sa & 569 \\
49 & www.wajibati.net & Education & 826 \\ \hline
50 & www.twitch.tv & Games & 70,337 \\ \hline \end{tabular}
\end{table}
Table 2: Cont.  
Then, we dump the DOM tree for each webpage looking for JavaScript programs called JSec programs when the privacy protection tools are disabled as a baseline for the remainder of the work, referred to as PPTs Off. Through this crawling process, we were able to build a dataset of 1578 JavaScript elements. At the same time, we create a separate Firefox profile for each tool to simultaneously fetch the JSec programs when the PPTs are enabled. The extensions were installed manually which made a new Firefox profile. As a result, we obtain six diverse Firefox profiles from the official Firefox extension page. Then, we applied the default settings to each except for Adblock Plus and Ghostery. In Adblock Plus, we have included an Arabic language filter list along with EasyList. Also, we have activated the recommended filters (Block additional tracking, Block cookie warnings, Block push notifications, and Block social media icon tracking). In Ghostery, the default setting does not enable any filtering functionality to keep web pages from being tracked. Instead, the user must manually configure the setting to protect against web tracking [11].  
All these steps are followed to test our experiment and preserve websites from being tracked. To evaluate the effectiveness of the PPTs in terms of blocking or enabling tracking JSec programs. We performed a quantitative analysis to quantify the number of blocked and enabled tracking JSec programs when handling requests from the most common 50 services. Considering the dynamic nature of the websites and different advertisements appearing at different times when accessing the sites, the experiment was performed simultaneously to ensure that the number of JSec programs remains constant. (Figure 3) summarizes the general structure of the analysis process.