MozillaZine

replace remote files with local files

User Help for Mozilla Firefox
enigma2118
 
Posts: 2
Joined: September 20th, 2017, 10:13 am

Post Posted September 20th, 2017, 10:18 am

While working on a website, I would like to replace the remote version of say a css or js file, with a local one. I know you could use Fiddler to do this. Charles is another one. I've seen some plugins, the closest is a Chrome one called Resource Override. I'd like to be able to do it without needing to run a local server. Tried following this line of thought:
https://developer.mozilla.org/en-US/Add ... P_requests
but not sure how to link to local file like
return {
redirectUrl: "C:\Users\name\Desktop\working.css"
};

Would be happy to add any additional information. Thank you all!

dickvl

User avatar
 
Posts: 52331
Joined: July 18th, 2005, 3:25 am

Post Posted September 20th, 2017, 8:48 pm

You can drag the file in a Firefox tab or use "File -> Open File".
Then you can copy the file:// URL from the location/address bar.

enigma2118
 
Posts: 2
Joined: September 20th, 2017, 10:13 am

Post Posted September 22nd, 2017, 11:40 am

Didn't work, thanks for the suggestion though. I'll just run an http server.

The lovely thing about Fiddler is that the browsers still "sees" the file as if it is coming from the original url. Really helps when debugging, particularly when ajax calls are involved.

Return to Firefox Support


Who is online

Users browsing this forum: No registered users and 4 guests