anchor.diff:  % HISTORY
   %%%%%%%%%
   handle(Req, #page_state{embed=Embed, resolver=Resolver, auth=Auth, mode=history}=State) ->
  -  {ok, Reply} = 
  +  {ok, Reply} =
     case resolve(Embed,Resolver,Auth) of
  -    {ok, Title, Queries} ->
  +    {ok, Title, Queries, _Zoom} ->
         {Step, Req1} = cowboy_req:header(<<"x-use-step">>, Req),
         Opts = use_step(Step),
         case pulse_history(Title, Queries, State, Opts) of
  
positive.code: 
  resolve(Embed, Resolver, Auth) ->
    case pulsedb_embed_cache:read(Embed) of
      {ok, Value} -> 
        Value;
      _ -> 
        Result = try resolve_embed(Embed, Resolver) of
          {ok, Resolved} ->
            try decrypt_embed(Resolved, Auth)
            catch C:E -> {error, {C,E}}
            end;
          Other -> 
            Other
        catch
          C:E -> {error, {C,E}}
  
negative.code: headers(html) -> [{<<"content-type">>, <<"text/html">>}].
  
  
  page_initial_data(Title, Embed, Path, Queries, Zoom) ->
    Step = lists:foldl(fun (Q, Max) ->
                         Q1 = pulsedb_query:parse(Q),
                         max(Max, pulsedb_query:downsampler_step(Q1))
                       end, 1, Queries),
    Protocol = if
      Step > 5 -> <<"http">>;
      true     -> <<"ws">>
    end,
    RangeSelector = if
      Zoom == true -> <<"range">>;
      true -> null
    end,
  
    [{title, Title},
     {protocol, Protocol},
     {step, jsx:encode(null)},
     {config, jsx:encode([{embed, Embed},
                          {container, <<"pulse">>},
                          {range_selector, RangeSelector},
                          {ws_path, filename:join([Path, ?WS_PATH])},
                          {http_path, filename:join([Path, ?HTTP_PATH])}])}].
  
  
  use_step(Value) when is_number(Value) ->
    [{step, Value}];
  
  use_step(Value) when is_binary(Value) ->
  