Skip to main content
49 events
when toggle format what by license comment
Oct 19, 2017 at 3:03 review Reopen votes
Oct 19, 2017 at 4:13
Oct 12, 2017 at 14:08 comment added user1228 This is completely possible. It just requires SO to rip out all ajax calls, remove all live notification of activity, and require that any user interaction with the website triggers a postback to the server with an accompanying reload of the entire webpage. You cool with that? Or with having all the benefits of async http requests while dealing with some browser caching issues?
Oct 12, 2017 at 11:21 review Reopen votes
Oct 12, 2017 at 12:14
Oct 12, 2017 at 11:02 history edited Donald Duck CC BY-SA 3.0
edited body
Oct 12, 2017 at 10:53 comment added Just a student It's a little annoying that I cannot answer this, but I think this question was shot down a bit early. It is technically possible to do what OP suggests, in modern browsers. Use the history API, and update the page when it is revisited. From where? Well, from sessionStorage, for example. Whether or not SO wants to do that is a different question, but the critique of 'this is how browsers work' is not valid, IMHO.
Oct 12, 2017 at 9:28 history edited Cody GrayMod
edited tags
Oct 12, 2017 at 8:52 vote accept Sudhanshu Gaur
Oct 12, 2017 at 11:10
Oct 12, 2017 at 7:40 comment added Sudhanshu Gaur @rene yes you are right but that's why i suggested to use browser storage.
Oct 11, 2017 at 22:38 comment added brasofilo Facebook is not a good reference on what browsing should be. I have to write custom stuff to query their API to get a decent browsing experience...
Oct 11, 2017 at 21:53 comment added rene And even if you would rely on the :visited state of a link and use that on the votes button, there is no way to unvisit a link, so if you undo your vote it would still remain visited.
Oct 11, 2017 at 21:27 comment added user4639281 It is possible using CSS to disable visited link highlighting. Facebook may be doing that. That has nothing to do with refreshing the page on press of the back button. They would only be changing the color of the visited links to that of normal links. I don't ever use or visit Facebook, so I don't know what for sure they are doing.
Oct 11, 2017 at 21:26 comment added Sudhanshu Gaur @TinyGiant I clicked on a link on a facebook post and then that link didn't get highlightened ??
Oct 11, 2017 at 21:24 comment added user4639281 Sorry... what? The visited link functionality (i.e. your browser highlighting links that you have visited) is entirely on the browser end. That has absolutely nothing to do with the website the links are contained on. Similarly, if you click on a link here, then press the back button, that link will be marked as visited and highlighted as such. This happens no matter where you are on the web because it is controlled by the browser, and has absolutely nothing to do with the site you're viewing.
Oct 11, 2017 at 21:22 comment added Patrice No, you are NOT pushing an update to Google. I may have been unclear. But the "link has been visited by you" isn't kept by Google, but by your browser. That's the difference here.
Oct 11, 2017 at 21:18 comment added Sudhanshu Gaur @Patrice yes i am pushing update to google but same is the case for SO there ?? don't you think ??
Oct 11, 2017 at 21:15 comment added Sudhanshu Gaur @rene yes but partial is better then nothing.
Oct 11, 2017 at 20:49 comment added Patrice @sudhanshuGaur hmmmm..... you clicking on a link and your browser highlighting it in blue isn't you pushing an update to Google's site. This is all browser side. Not like you updating the score of an answer on Google....
Oct 11, 2017 at 20:40 comment added rene If your scenario is also only half a fix then let just keep the status quo and do nothing. The only thing that could work is make an extra roundtrip to the server on pageloadComplete, either via an ajax call or a websocket to fetch the actual voting state. But as I said earlier, Nick is going to hate you for the extra connections/network/server load that will cost. And if the solution is going to comprise average pagespeed for everyone you can forget it. It will be a status-declined
Oct 11, 2017 at 20:39 comment added Pekka I've been using the site for 7 years now and cast some 23,000 votes. I've run into this from time to time but somehow it's not been a problem, ever, not even a single time. If you care about the vote count then reload the page. Problem solved. No?
Oct 11, 2017 at 20:39 comment added Davis Broda you mention "your answer", but you don't have an answer. You have - at best - a vague idea of an end-goal, but no plausible means to get there, or for dealing with anything but the most absolutely straightforward of cases. Maybe this would be better received if you had a specific idea of how this is to be accomplished, but as it stands you're asking SO to put in a ton of work essentially rewriting incoming browser's caching functionality for what is at best marginal improvement to the end-user, as they can just reload the page for the same result.
Oct 11, 2017 at 20:26 comment added Sudhanshu Gaur @rene Look when i have undo my question from different tab still it work as storage is again the same where upvoted posts are stored so now it would be removed. Also what user is going to do in other browser upvote/downvote/undo for all the cases my answer will be compromised but the current code which SO is using is also compromised. because both codes are not working for this case but atleast for the case where user upvote/downvote from sametab or from different tab my answer will work.
Oct 11, 2017 at 20:25 history closed Steve
Nicol Bolas
Michael Gaskill
Mike Beeler
cs95
Not suitable for this site
Oct 11, 2017 at 20:20 comment added rene No, that would be immensely complex, you need to keep track which questions you visited, what their vote state was, then onload determine which value is true, the server one, or the localstorage one. Now bring in that you can undo your vote in a second tab or even in another browser. Or from your phone, or from your work pc. And then you navigate back to a page from 3 weeks ago. What do you expect to happen? I would personally just want to reload the frigging page from the server so that I know I'm looking at up to date and valid for all data.
Oct 11, 2017 at 20:13 comment added Sudhanshu Gaur @DavisBroda But can't they store it in browser storage and then when page is being rendered then they can see whether user upvoted post previously or not ??
Oct 11, 2017 at 20:11 history edited Davis Broda CC BY-SA 3.0
remove thanks
Oct 11, 2017 at 20:10 comment added Davis Broda Google - and other sites - remember which links you've clicked on because those links are stored in your internet history. If it sees a page in your recent history that matches the link it colors it in. However your voting information is not kept in your browsing history, so the browser has no way of knowing the action has taken place, and renders the page as it was last loaded; without any votes.
Oct 11, 2017 at 20:05 comment added cs95 You already asked once in the comments. Just be patient and wait, don't vandalise your question.
Oct 11, 2017 at 20:03 comment added Sudhanshu Gaur @cᴏʟᴅsᴘᴇᴇᴅ If you have questions about how the google website works, go and ask google Sorry if i got you wrong but in comments other users asked me to mention any other website where this functionalty doesn't work. That's why I pointed out this issue. Please read before doing anything.
Oct 11, 2017 at 20:03 comment added rene Sure, they can do all kind of things. Instead they build Documentation, Team, Jobs and Channels. Tough choices.
Oct 11, 2017 at 20:01 comment added Sudhanshu Gaur @rene they can store it in browser storage and then when page is being rendered then they can see whether user upvoted post previously or not ?? Thanks for answering.
Oct 11, 2017 at 19:54 comment added cs95 I've rolled back your edit. If you have questions about how the google website works, go and ask google.
Oct 11, 2017 at 19:54 comment added rene Your up or down vote is posted as an ajax request. Your vote never becomes part of the document as stored in the history of your browser. Your votes are not fetched when the page is served from the browser cache. To see your votes you have to do a reload so the server can serve you a page that has your vote in it. To resolve this minor issue a lot of dev time / re-design is needed and possible performance will be lost.
Oct 11, 2017 at 19:54 history rollback cs95
Rollback to Revision 2
Oct 11, 2017 at 19:48 comment added Sudhanshu Gaur @DavisBroda then how in case for google search it is happening correctly ?? Look if this functionality only work becuase of browser side then on every website when i click on the link and then when i come back again then that link should be highlightened ??
Oct 11, 2017 at 19:47 review Close votes
Oct 11, 2017 at 20:32
Oct 11, 2017 at 19:46 comment added Servy @SudhanshuGaur If you want to write your own browser that always reloads pages when using the back button, more power to you. SO is in the business of making QA sites, not building browsers, and so isn't going to make their own browser with different functionality than whatever your browser does to fix this for you.
Oct 11, 2017 at 19:45 comment added Sudhanshu Gaur @TGrif sorry but i don't get you ?? as if i have upvoted my post and tehn when i move back it should show me that i have updated the post ?? Is there anything wrong in that functionality ??
Oct 11, 2017 at 19:45 comment added Davis Broda @SudhanshuGaur Because the SO team cannot control what browsers do. They're developed by entirely separate teams of people.
Oct 11, 2017 at 19:43 comment added TGrif I suppose click again will reverse your vote.
Oct 11, 2017 at 19:42 comment added Sudhanshu Gaur @TinyGiant Then why SO developers don't do the same thing then ??
Oct 11, 2017 at 19:41 comment added user4639281 Visited links are handled differently by the browser, which has nothing to do with the page loading or the scripts therein.
Oct 11, 2017 at 19:39 comment added Sudhanshu Gaur Can you please have a relook at my question @Patrice
Oct 11, 2017 at 19:38 history edited Sudhanshu Gaur CC BY-SA 3.0
added 432 characters in body
Oct 11, 2017 at 19:11 comment added Patrice Show me ANY website where you can do an update, leave the page, go back (with a brower "back", not revisit the page ofc), and see your change..... this is just.... not how caching and browsers work.....
Oct 11, 2017 at 19:10 history edited user247702
edited tags
Oct 11, 2017 at 19:09 answer added Servy timeline score: 20
Oct 11, 2017 at 19:08 comment added Sudhanshu Gaur But I think it should not happen. It is happening everytime for every post.
Oct 11, 2017 at 19:07 comment added Patrice It's likely just caching. Refresh the post and you'll see your vote.
Oct 11, 2017 at 19:02 history asked Sudhanshu Gaur CC BY-SA 3.0