Showing posts with label Javascript. Show all posts
Showing posts with label Javascript. Show all posts

Wednesday, 4 July 2012

Detect last updated web page date and time

Just go to the desired web page of your choice and paste the following code in your address bar:
 
javascript:alert(document.lastModified)

Tested in IE9

Thursday, 19 April 2012

About setTimeout

Never give either setTimeout or setInterval a string containing code; instead, give it an actual function reference. Otherwise, it won't work.

function foo() {
    display("Hi there");
}
setTimeout(foo, 500);

Friday, 2 March 2012

Track events using Chrome javascript debugger

Thanks, stackoverflow. (http://bit.ly/wtmA62)
find the element that is being reloaded and right click, choose inspect from context menu, then right click the html of the element (in the bottom firebugish pane), in the context menu there are options to:
  • break on subtree modifications
  • break on attributes modifications
  • break on node removal