Hacker Newsnew | comments | show | ask | jobs | submit login

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'))
  	{
  		$('a[data-pjax]').removeAttr('data-pjax');
  	}
  });

-----


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

Search: