Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
HTML 5 History - Ryan Mulligan
Search
Las Vegas Ruby Group
January 01, 2012
0
41
HTML 5 History - Ryan Mulligan
Las Vegas Ruby Group
January 01, 2012
Tweet
Share
More Decks by Las Vegas Ruby Group
See All by Las Vegas Ruby Group
Ruby ISO Standard - David Grayson
lvrug
0
130
Windows Automation - Howard Feldman
lvrug
0
64
Separating Your Application from Rails - Brian Hughes
lvrug
0
110
SWIG and Ruby - David Grayson
lvrug
0
72
Practical Object-Oriented Design in Ruby - Charles Jackson
lvrug
3
130
The Hamster Gem - Ryan Mulligan
lvrug
1
87
Varnish+Redis - Russ Smith
lvrug
1
99
Lambdas and Pops - Jan Hettich
lvrug
0
73
Making Good Use of Fonts - Russ Smith
lvrug
1
84
Featured
See All Featured
It's Worth the Effort
3n
187
28k
How to train your dragon (web standard)
notwaldorf
96
6.2k
Designing for humans not robots
tammielis
253
25k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Six Lessons from altMBA
skipperchong
28
4k
Rebuilding a faster, lazier Slack
samanthasiow
83
9.2k
Imperfection Machines: The Place of Print at Facebook
scottboms
268
13k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
920
Practical Orchestrator
shlominoach
190
11k
Side Projects
sachag
455
43k
How STYLIGHT went responsive
nonsquared
100
5.8k
Transcript
HTML 5 History Manipulation
What is it? Changing the browser history, even the current
URL.
Who's using it? Github, Facebook, etc.
Do browsers support it? http://caniuse. com/#search=histor y
What does it replace? Hash hacks, traditional navigation http://example.com/page1/?id=1#preview
What can I do with it? add to history stack
change top of stack
Add to history stack window.history.pushState(data, title [, url ] )
example: window.history.pushState("hello world"," Ryan's Presentation","/ryans-presentation");
Modify the top of the stack window.history.replaceState(data, title [, url
] ) example: window.history.replaceState("hello world"," Ryan's Presentation","/ryans-presentation2");
Why state? http://dev.w3. org/html5/spec-author- view/history.html#state- object
Questions?