Magnific Popup meets HTML5 History API (via History.js)

GitHub repository. This is just a demo, not a ready plugin, assembled by Eugene / Dae (dae@dae.me).

  1. Browser’s “Back” button closes the popup and “Forward” reopens previously open image.
  2. Document title is updated dynamically with alt attribute of the open image.
  3. Each image has its own URL, which can be bookmarked and shared. You may also want to write a server-side handler of the ?item GET-parameter to output og:image meta tag for Facebook and Twitter.

How to make Magnific Popup open ?item=something at page load?