Title: [Error] Loading remote file (http://desktop-scripts.js) failed.
Last modified: March 10, 2019

---

# [Error] Loading remote file (http://desktop-scripts.js) failed.

 *  Resolved [sanjaisc](https://wordpress.org/support/users/sanjaisc/)
 * (@sanjaisc)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/error-loading-remote-file-http-desktop-scripts-js-failed/)
 * Hi,
 * First of all let me start by saying that Swift Performance is an awesome caching
   plugin and possibly ranks among the best caching plugins available. Keep it up
   guys!
 * I have a strange problem on several websites hosted with A2Hosting. When opening
   pages on Chrome (Desktop) there is no error. But if I open the same page on Chrome(
   Mobile) or Firefox (Desktop) I get an error:
 * [Error] Loading remote file ([http://desktop-scripts.js](http://desktop-scripts.js))
   failed. Error: cURL error 6: Could not resolve host: desktop-scripts.js
 * The specified file is located at: [http://canadiancapitalist.ca/ccapitalist/wp-content/cache/swift-performance/canadiancapitalist.ca/js/desktop-scripts.js](http://canadiancapitalist.ca/ccapitalist/wp-content/cache/swift-performance/canadiancapitalist.ca/js/desktop-scripts.js)
 * The Cache path specified in Swift Performance is: /home/sanjaisc/public_html/
   ccapitalist/wp-content/cache/ which is correct.
 * The rewrite rules in .htaccess are as follows:
 * <IfModule mod_rewrite.c>
    RewriteEngine On RewriteBase / RewriteCond %{REQUEST_METHOD}!
   POST RewriteCond %{QUERY_STRING} ^$ RewriteCond %{HTTP:Cookie} !^.*(wordpress_logged_in).*
   $ RewriteCond %{REQUEST_URI} !^/wp-content/cache/swift-performance/([^/]*)/assetproxy
   RewriteCond /home/sanjaisc/public_html/ccapitalist/wp-content/cache/swift-performance/%{
   HTTP_HOST}%{REQUEST_URI}/desktop/unauthenticated/index.html -f RewriteRule (.*)
   wp-content/cache/swift-performance/%{HTTP_HOST}%{REQUEST_URI}/desktop/unauthenticated/
   index.html [L]
 * <IfModule mod_headers.c>
    RewriteRule (.*)/desktop/unauthenticated/(.*).html –[
   E=cache_base_uri:$1] Header set Link “</%{cache_base_uri}e/css/desktop-full.css
   >; rel=preload; as=style,</%{cache_base_uri}e/js/desktop-scripts.js>; rel=preload;
   as=script” env=cache_base_uri </IfModule>
 * </IfModule>
 * Any pointers as to what could be going wrong will be highly appreciated.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-loading-remote-file-http-desktop-scripts-js-failed%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [Fred](https://wordpress.org/support/users/fredawd/)
 * (@fredawd)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/error-loading-remote-file-http-desktop-scripts-js-failed/#post-11296681)
 * Hi,
    Thank you for your kind words.
 * This is probably caused by an improper order of htaccess rules. Probably you 
   are using a force SSL or force www/non-www rule in .htaccess. Please remove these
   rules from .htaccess, and insert them in
 * Settings→General→Tweaks: Custom .htaccess
    or at least at the top of the .htaccess
   file.
 * Read more about this issue in our [FAQ](https://swiftperformance.io/kb/strange-redirects/)

Viewing 1 replies (of 1 total)

The topic ‘[Error] Loading remote file (http://desktop-scripts.js) failed.’ is closed
to new replies.

 * ![](https://ps.w.org/swift-performance-lite/assets/icon-256x256.jpg?rev=2388229)
 * [Swift Performance Lite](https://wordpress.org/plugins/swift-performance-lite/)
 * [Support Threads](https://wordpress.org/support/plugin/swift-performance-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/swift-performance-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/swift-performance-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/swift-performance-lite/reviews/)

## Tags

 * [Loading error](https://wordpress.org/support/topic-tag/loading-error/)

 * 1 reply
 * 2 participants
 * Last reply from: [Fred](https://wordpress.org/support/users/fredawd/)
 * Last activity: [7 years, 2 months ago](https://wordpress.org/support/topic/error-loading-remote-file-http-desktop-scripts-js-failed/#post-11296681)
 * Status: resolved