Hacker News new | comments | show | ask | jobs | submit login

What might be a good idea for Javascript-heavy web apps is to make an Ajax call to the server to see if a refresh of the page is required.

Please don’t even call out to the server, unless I actively interact with the page. I sometimes open 50 or 60 browser tabs at once, and when I unsleep my laptop or connect to a new wifi hotspot, many of them try to simultaneously make such ajax calls, which prevents any other web pages I want to open from loading until those calls either make it through or time out. Occasionally I have to SIGSTOP my main browser and open a different one if I need to access something online right away. Even pages of ostensibly static content, like years-old news articles, now are littered with "web 2.0" doodads on them which do this kind of crap.

Please don't take this the wrong way but why do you have 50-60 browser tabs open? Are you using browser tabs as some sort of todo list? Isiteffective?

I currently have 42 tabs open in Chrome (in two separate windows). Yes, it's like a todo list. It would work better if I had a mechanism to de-duplicate tabs that were open to the same URL - sometimes I find that I've got three tabs open all monitoring the same CI build. But I also keep several JIRA bugs open in tabs so I don't forget them, two Gmail accounts and twitter, I've got five-ish articles that I was in the middle of reading, some reference documents for a few projects I'm in the middle of, a couple of youtube videos that I haven't found time to watch yet...

There have been days when I have had more than 100 browser tabs open. Users should be able to have as many tabs as they want.

That was not the question - I am paying to have a small office to reduce my distractions, and allow focusing. I am just interested in how people manage the distractions, and with 100 tabs open I would presume that they are not all open regarding the same single task at hand.

They aren't.

Most of them are open from other tasks. But that doesn't make them a distraction. They're there for when the current task finishes and I can go back to them.

The alternative is to close them all down and reopen them, which is vastly more time consuming.

Please don't do that. I left that tab open on purpose, I'm half way through reading the page - if the page refreshes I likely lose my position

You don't have to refresh the page, you could make it so that your next page click loads the full page instead of using ajax/pjax.

quick pjax e.g.:

  <html data-lastupdated="1234567890"...

  $.getJSON('/lastupdated.json', function(lastupdated) {
  	if(lastupdated > $('html').data('lastupdated'))

This is exactly what I meant by my initial comment - I should have been more clear.

You don't have to force a reload, you can just suggest that the user reloads. Eg: "Please reload the page to get the latest version"

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact