in my cpanel i have counter called "add to favorite" , and i can't understand how does this counter work , cause after someone bookmark a website or added to my favorites does the browser sends data to the site telling it that it has been bookmarked or added to favorites.....

Dani AI

Generated

As asked, the key point is that a webserver cannot magically know when a browser adds a page to its local bookmarks. cPanel can only count things that generate HTTP requests (clicks that load a URL, image requests, script calls etc.). Icon fetches or other automatic resource loads are not reliable evidence of a user actually saving a bookmark, which is what and were getting at.

To verify what that cPanel counter is actually counting, run a simple check:

  • Reset the counter in cPanel, open the browser DevTools Network tab, then click the page's "Add to favorites" control and watch which request (if any) fires.
  • If a request is shown, match that path against the server Raw Access Logs in cPanel to see the exact hits and timestamps.
  • If no network request appears, the counter can only be incremented by some server-side resource that is automatically loaded elsewhere on the site, not by the browser bookmarking action itself.

For reliable tracking, the usual approach is to ensure the "Add to favorites" control first calls a server-side endpoint (or loads a tiny tracking image) that increments a stored count, then performs any client-side bookmark action. Note: programmatic bookmarking differs across browsers and many users add bookmarks via browser UI (which cannot be observed server-side), so any counter should be treated as "clicks on the add control" rather than proof of saved bookmarks.

Recommended Answers

All 4 Replies

i think you must be right. I am not a user of Cpanel but that sounds about right to me. Unless you maybe have to put a link that on your site that says "add to favourites" and it does but it also sends information to your cpanel counter?

What is the name of your site? Set the counter back to null and I will add your site to my favourites and we will see what it does...

Many web browsers nowadays associate an icon with a favorites item, a request for favorite.ico on the web server.

Many web browsers nowadays associate an icon with a favorites item, a request for favorite.ico on the web server.

yes i know and i made an icon for my website in the name favicon.ico ....but i still can't understand what this counter "added to favorites" in my cpanel counts?? where does it get its data

Many web browsers nowadays associate an icon with a favorites item, a request for favorite.ico on the web server.

This is true but just because the browser requests it, it doesn't mean the person has added it to their favourites because they often display them in the address bar as well and at the left hand side of the tab, so that would mean the cpanel counter would count every time it displayed the web page.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.