Answer the question
In order to leave comments, you need to log in
What could be causing server connection drop in safari?
Comrades, help for 3 days now I can’t understand what safari doesn’t like
, this is the answer from the server:
(ActionController::Live is used)
response.headers['Content-Type'] = 'text/event-stream'
action = params[:user_action] || :export
loader = @user_document.loader(action)
@redis = Redis.new(host: '127.0.0.1', port: 6379, db: 0)
@redis.subscribe(loader.key) do |on|
on.message do |event, data|
if data.blank? || data.to_i == 100
response.stream.write "data: #{data}\n\n"
@redis.unsubscribe(loader.key)
end
response.stream.write "data: #{data}\n\n"
end
end
inLoadFromServer() {
progressProgressBar = 0;
let source = new EventSource('progress_upload'),
increase_on;
source.onmessage = function(e) {
}
}
Answer the question
In order to leave comments, you need to log in
I also encountered this unknown ebanina. Failed to win. As a result, he left for WS.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question