anchor.diff:  headers(html) -> [{<<"content-type">>, <<"text/html">>}].
   
   
  -page_initial_data(Title, Embed, Path, Queries) ->
  +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 
  +  Protocol = if
       Step > 5 -> <<"http">>;
  -    true     -> <<"ws">> 
  -  end,
  +    true     -> <<"ws">>
  +  end,
  +  RangeSelector = if
  +    Zoom == true -> <<"range">>;
  +    true -> null
  +  end,
  +
     [{title, Title},
  -   {protocol, Protocol}, 
  +   {protocol, Protocol},
      {step, jsx:encode(null)},
      {config, jsx:encode([{embed, Embed},
                           {container, <<"pulse">>},
  -                        {range_selector, <<"range">>},
  -                        {ws_path, filename:join([Path, ?WS_PATH])}, 
  +                        {range_selector, RangeSelector},
  +                        {ws_path, filename:join([Path, ?WS_PATH])},
                           {http_path, filename:join([Path, ?HTTP_PATH])}])}].
   
   
  -use_step(Value) when is_number(Value) -> 
  +use_step(Value) when is_number(Value) ->
     [{step, Value}];
   
   use_step(Value) when is_binary(Value) ->
  
positive.code: % PAGE
  %%%%%%
  handle(Req, #page_state{embed=Embed, resolver=Resolver, auth=Auth, mode=subscribe}=State) ->
    {ok, Reply} = 
    case resolve(Embed,Resolver,Auth) of
      {ok, Title, Queries} ->
        {Path, Req5} = cowboy_req:path(Req),
        InitData = page_initial_data(Title, Embed, Path, Queries),
        Page = fill_template(ok, InitData),
        cowboy_req:reply(200, headers(html), Page, Req5);
      {deny, Message} ->
        cowboy_req:reply(403, headers(html), fill_template(denied, [{message, Message}]), Req);
      {not_found, Message} -> 
        cowboy_req:reply(404, headers(html), fill_template(not_found, [{message, Message}]), Req);
      {error, Message} -> 
        lager:warning("embed resolving error ~p", [Message]),
        cowboy_req:reply(500, headers(html), fill_template(error, []), Req)
    end,
  
negative.code:       end;
      {deny, Message} ->
        cowboy_req:reply(403, headers(json), jsx:encode([{error, Message}]), Req);
      {not_found, Message} ->
        cowboy_req:reply(404, headers(json), jsx:encode([{error, Message}]), Req);
      {error, Message} ->
        lager:warning("embed resolving error ~p", [Message]),
        cowboy_req:reply(500, headers(json), jsx:encode([{error, Message}]), Req)
    end,
  