diff --git a/gui/cefdisplay/src/simple_app.cxx b/gui/cefdisplay/src/simple_app.cxx
index 33ccf1863379ee3440f6b91e0ede95b81f733adc..ad420e46338b254772f62e916c5a511066783686 100644
--- a/gui/cefdisplay/src/simple_app.cxx
+++ b/gui/cefdisplay/src/simple_app.cxx
@@ -58,6 +58,11 @@ protected:
 
    CefRefPtr<CefCallback> fCallBack{nullptr};
 
+   void CheckWSPageContent(THttpWSHandler *) override
+   {
+
+   }
+
 public:
    explicit TCefHttpCallArg() = default;
 
diff --git a/gui/qt5webdisplay/rooturlschemehandler.cpp b/gui/qt5webdisplay/rooturlschemehandler.cpp
index 2296a5eb01fb2a174afb0afabf612612c165fd44..f7908274bbbea903ef344638770bac160059ab4d 100644
--- a/gui/qt5webdisplay/rooturlschemehandler.cpp
+++ b/gui/qt5webdisplay/rooturlschemehandler.cpp
@@ -62,6 +62,10 @@ class TWebGuiCallArg : public THttpCallArg {
 protected:
    UrlRequestJobHolder fRequest;
 
+   void CheckWSPageContent(THttpWSHandler *) override
+   {
+   }
+
 public:
    explicit TWebGuiCallArg(QWebEngineUrlRequestJob *req = nullptr) : THttpCallArg(), fRequest(req) {}
 
diff --git a/net/http/inc/THttpCallArg.h b/net/http/inc/THttpCallArg.h
index a9bd371a41c10f6cabcde096250f4004cc833e04..53530b7f4dad0f077462e306abee647cbbe982ae 100644
--- a/net/http/inc/THttpCallArg.h
+++ b/net/http/inc/THttpCallArg.h
@@ -25,6 +25,7 @@ class THttpWSEngine;
 class THttpWSHandler;
 
 class THttpCallArg : public TObject {
+
    friend class THttpServer;
    friend class THttpWSEngine;
    friend class THttpWSHandler;
@@ -63,7 +64,7 @@ protected:
 private:
    std::shared_ptr<THttpWSEngine> fWSEngine; ///<!  web-socket engine, which supplied to run created web socket
 
-   std::string  fContent;  ///!< content - text or binary
+   std::string  fContent;  ///<! content - text or binary
    std::string  fPostData; ///<! data received with post request - text - or binary
 
    void AssignWSId();
@@ -71,6 +72,9 @@ private:
 
    void ReplaceAllinContent(const std::string &from, const std::string &to);
 
+   /** Method used to modify content of web page used by web socket handler */
+   virtual void CheckWSPageContent(THttpWSHandler *) {}
+
 public:
    explicit THttpCallArg() = default;
    virtual ~THttpCallArg();
diff --git a/net/http/src/THttpServer.cxx b/net/http/src/THttpServer.cxx
index 10ef74121231a1274403c9564e6dec7a51712d98..98a795381dac4a8c47cac6580e1e6d5c44129797 100644
--- a/net/http/src/THttpServer.cxx
+++ b/net/http/src/THttpServer.cxx
@@ -751,6 +751,8 @@ void THttpServer::ProcessRequest(THttpCallArg *arg)
                arg->fContent = ReadFileContent(resolve.Data());
                arg->AddNoCacheHeader();
             }
+
+            arg->CheckWSPageContent(handler);
          }
       }