ureech,
<!DOCTYPE HTML>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
.blg{
color: #1060BF;
}
.def{
color: #9B0E14;
}
</style>
<script>
function set_class(cls)
{
document.getElementById('header').className = cls;
localStorage.cls = cls
}
window.onload = function ()
{
var cls = localStorage.cls;
cls && set_class(cls)
}
</script>
</head>
<body>
<h1 id="header">Вот так</h1>
<input type='button' style="background:#1060BF" value='Test' onclick="set_class('blg')">
<input type='button' style="background:#9B0E14" value='Test' onclick="set_class('def')">
</body>
</html>