       ;; might want to use .-visited here
       (goog/isProvided__ (name namespace))))))
 
-(def js-reload*
-  (if (= :node (utils/host-env?))
-    reload-file
-    require-with-callback))
-
 (defn js-reload [{:keys [request-url namespace] :as file-msg} callback]
   (dev-assert (namespace-file-map? file-msg))
   (if (reload-file? file-msg)
-    (js-reload* file-msg callback)
+    (require-with-callback file-msg callback)
     (do
       (utils/debug-prn (str "Figwheel: Not trying to load file " request-url))
       (apply callback [file-msg]))))
 
 (defn reload-js-file [file-msg]
   (let [out (chan)]
-    (js/setTimeout #(js-reload file-msg (fn [url]
-                                          (patch-goog-base)
-                                          (put! out url)
-                                          (close! out))) 0)
+    (js-reload
+     file-msg
+     (fn [url]
+       (patch-goog-base)
+       (put! out url)
+       (close! out)))
     out))
 
 (defn load-all-js-files

         (.insertBefore parent klone (.-nextSibling orig-link)))
       (js/setTimeout #(.removeChild parent orig-link) 300))))

(defn reload-css-file [{:keys [file request-url] :as f-data}]
  (if-let [link (get-correct-link f-data)]
    (add-link-to-doc link (clone-link link (.-href link)))
    (add-link-to-doc (create-link (or request-url file)))))

(defn reload-css-files [{:keys [on-cssload] :as opts} files-msg]
  (when (utils/html-env?)
    (doseq [f (add-request-urls opts (:files files-msg))]
      (reload-css-file f))
    (go
      (<! (timeout 100))
      (on-cssload (:files files-msg)))))


(defonce on-load-callbacks (atom {}))

(defonce dependencies-loaded (atom []))

(defn blocking-load [url]
  (let [out (chan)]
    (reload-file
