Skip to content

Commit

Permalink
Had issues with firebug lite, now we include it remotely. Fixed issue…
Browse files Browse the repository at this point in the history
… with persistant states in IE. More JSHint compat.
  • Loading branch information
balupton committed Mar 31, 2011
1 parent 93e0a38 commit 3735964
Show file tree
Hide file tree
Showing 41 changed files with 58 additions and 7,933 deletions.
9 changes: 4 additions & 5 deletions README.md
Expand Up @@ -91,9 +91,7 @@ Copyright 2011 [Benjamin Arthur Lupton](http://balupton.com)

<script>if ( typeof window.JSON === 'undefined' ) { document.write('<script src="../scripts/<?=$dir?>/json2.js"><\/script>'); }</script>

3. Include Data Persistance Support (optional but recommended)

Data persistance allows for state data and titles to remain intact after the browser session has closed. This is useful in the case that someone navigates away from your website, then back to it. Without data persistance the state data and titles will be empty, with it they will be like they were before.
3. Include [Amplify.js](http://amplifyjs.com/) for Data Persistance and Synchronisation Support (optional but recommended)

<script src="http://www.yourwebsite.com/history.js/scripts/compressed/amplify.store.js"></script>

Expand Down Expand Up @@ -215,6 +213,7 @@ Thanks! every bit of help really does make a difference. Again thank you.
- State data and titles do not persist once the site is left and then returned (includes page refreshes)
- State titles are never applied to the `document.title`
- ReplaceState functionality is emulated in HTML4 browsers by discarding the replaced state, so when the discarded state is accessed it is skipped using the appropriate `History.back()` / `History.forward()` call
- Data persistance and synchronisation works like so. Every second or so, the SUIDs and URLs of the states will synchronise between the store and the local session. When a new session opens a familiar state (via the SUID or the URL) and it is not found locally then it will attempt to load the last known stored state with that information.
- Changing the hash of the page causes `onpopstate` to fire; this is expected/standard functionality. To ensure correct compatibility between HTML5 and HTML4 browsers the following events have been created:
- `window.onstatechange`: this is the same as the `onpopstate` event except it does not fire for traditional anchors
- `window.onanchorchange`: this is the same as the `onhashchange` event except it does not fire for states
Expand All @@ -225,8 +224,8 @@ Thanks! every bit of help really does make a difference. Again thank you.
## Changelog

- v1.7.0 - ???
- Added Data Persistance and Synchronisation Support thanks to [AppendTo's](http://appendto.com/) [Amplify.js](http://amplifyjs.com/)
- Made HTML5 SUIDs more transparent- [Reported](https://github.com/balupton/History.js/issues#issue/34) by [azago](https://github.com/azago) and [Mark Jaquith](http://markjaquith.com/)
- Added (optional but recommended) Data Persistance and Synchronisation Support thanks to [AppendTo's](http://appendto.com/) [Amplify.js](http://amplifyjs.com/) - See installation and compatibility sections for details
- Made HTML5 SUIDs more transparent - [Reported](https://github.com/balupton/History.js/issues#issue/34) by [azago](https://github.com/azago) and [Mark Jaquith](http://markjaquith.com/)
- Fixed Session Storage Issue - Reported by a whole bunch of different people; [one](https://github.com/balupton/History.js/issues#issue/36), [two](https://github.com/balupton/History.js/issues#issue/37), [three](http://getsatisfaction.com/balupton/topics/history_js_1_6_losing_state_after_manual_page_reload)

- v1.6.0 - March 22 2011
Expand Down
2 changes: 1 addition & 1 deletion demo/index.html
Expand Up @@ -8,7 +8,7 @@
</title>

<!-- FireBug Lite -->
<script>if ( typeof console === 'undefined' || typeof console.log === 'undefined' || typeof console.log.apply === 'undefined' ) { document.write('<script src="../vendor/firebug-lite.js"><\/script>'); }</script>
<script>if ( typeof console === 'undefined' || typeof console.log === 'undefined' || typeof console.log.apply === 'undefined' ) { document.write('<script src="http://getfirebug.com/firebug-lite.js"><\/script>'); }</script>
</head>
<body style="padding-bottom:40px">
<!-- Scripts -->
Expand Down
2 changes: 1 addition & 1 deletion scripts/compressed/history.html4.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3735964

Please sign in to comment.