2024 Avtor: Peter John Melton | [email protected]. Nazadnje spremenjeno: 2024-01-15 03:53
Današnja seja vprašanj in odgovorov se nam je zahvalila SuperUserju, ki je razdeljena na Stack Exchange, skupinsko spletno stran Q & A.
Fotografija avtorja Pedro Vezini (Flickr).
Vprašanje
Bralec SuperUserja Ruud Lenders želi vedeti več o tem, kako delujejo nastavitve in piškotki za spletna mesta:
A pop-up displayed on a website that I visited and asked me if I would allow the website to store preferences in cookies. By accident, I chose no. Refreshing the page does not bring the pop-up back. Is there a way to get this kind of pop-up back without clearing the history and cookies?
This also got me to thinking. How can a website remember if it is allowed to store cookies? By storing it in a cookie?
Kako spletna stran zapomni vaše splošne želje in izbira glede piškotkov na splošno?
Odgovor
Odgovor za nas je odgovoril bvukelić, ki je sodeloval z SuperUserjem:
They asked you if you would like to store preferences in cookies, not if you would like them to set cookies in general. So if I were writing support for this feature, I would set a separate cookie (nopref) and check whether or not the user has this cookie. There is a good chance you will find such a cookie for that website, which you can clear without removing other cookies or history.
Inspecting Cookies Set for a Particular Page
In Firefox, you can list cookies for a particular web page by right-clicking a blank part of the page, then selecting the View Page Info option. You will find a View Cookies button in the Security Tab. In Chrome, you have the same View Page Info option which opens a dialog that hangs from the address bar. A link near the top will take you to a listing of cookies. I assume similar features can be found in other browsers.
Discovering if a Website Sets a Cookie
Here is one way that you can discover what the website is doing. Visit the website in Incognito Mode. Open the Developer Tools and switch to the Network Tab. Then check to see what activity is occurring in the background as you decline having the site track you with cookies. Specifically, look for response headers and see if there are any Set-Cookie headers in there. Then try deleting cookies mentioned in the header to see if that makes any difference.
About localStorage
Since another poster has mentioned localStorage (in-browser database), I will comment on this as well. I think it will be very rare that a website uses localStorage for this purpose as localStorage data is not accessible to the server unless there is JavaScript code that sends the data back to the server. If you wish to check the contents of localStorage, the fastest way is to open the Developer Tools in your browser, go to the (JavaScript) Console Tab, and type localStorage. This should give you an output that looks something like:
Storage { someKey: “value”, length: 1 }
The someKey identifies the value set by JavaScript on the web page you are on. If you believe someKey does something relevant, you can try removing it by running the following:
localstorage.removeItem(‘someKey’);
This removes the data under someKey from localStorage, and reloading the web page may restore it to factory settings. If you are not sure the particular key is set by the cookie notification functionality, you may open the web page in Incognito Mode and list the contents of localStorage before interacting with the web page.
Again, I doubt many websites use localStorage for this purpose.
Imate kaj dodati k razlagi? Zvok v komentarjih. Želite prebrati več odgovorov od drugih uporabniških članov stack Exchange? Oglejte si celotno temo za razpravo tukaj.
Priporočena:
Zakaj je ta spletna stran zlomljena na telefonu?
Pametni telefoni so že skoraj desetletje, toda zdaj, ko brskam po spletu na svojem iPhone-ju, naletim na spletna mesta, ki ne delujejo zelo dobro. Včasih so težave s tehnologijami, ki se uporabljajo na spletnih mestih, vendar včasih ležijo z aplikacijami, ki sem jih namestil v svoj telefon. Zato si oglejte nekaj razlogov, zakaj spletna mesta morda ne bodo pravilno delovala na vaši mobilni napravi.
Kaj je temna spletna stran?
Obstajata dva spleta. Običajno spletno večino ljudi uporablja vsak dan, kar je lahko dostopno in indeksirano z iskalniki. In potem obstajajo "temne spletne" skrite spletne strani, ki se ne bodo prikazale, ko iščete Google in jih ni mogoče dostopati brez posebne programske opreme.
Da, vsaka spletna stran za nalaganje frekvenc je vročanje Crapware (tukaj je dokaz)
Ko smo pisali o tem, kaj se zgodi, ko namestite prvih deset aplikacij iz CNET Downloads, približno polovica komentarjev je bilo od ljudi, ki so rekli: "No, morate prenesti iz zaupanja vrednega vira." Edina težava je, da ni brezplačnega prenosa spletna stran, ki je brez slepih ali adware. In tukaj je rezultat naše preiskave, da to dokažemo.
Messenger se ne spomni uporabniškega imena in gesla
Če ugotovite, da vaš Windows Love Messenger iz neznanega razloga pozabi, da se spomnite vaših Windows Live ID-jev po ponovnem zagonu sistema Windows, boste morda želeli poskusiti, da izberete Messenger
Kako stari izgledam spletna stran podjetja Microsoft?
Obiščite spletno mesto how-old.net iz Microsofta, naložite svojo sliko in ugotovite, kako stari izgledate. Aplikacija ugibati starost in spol, ki temelji na API za zaznavanje obrazov.