Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

How can I run a website on a usb external drive that uses other local files

  • Nema odgovora
  • 1 ima ovaj problem
  • 3 views
more options

SITUATION:

1. I am trying to run a website from a usb external drive (Windows 10, 32-bit, Firefox 80), and it does not run completely. 2. I can run the index.htm file to show the static part of the page, so the css is being read. The variable part of the page is determined by options that then runs other files, and this content is missing. The content is provided by htm and js files. 3. I knows that the code works because the website works when run on a remote server. 4. The same happens with Chrome and Edge. 5. Using the debugger, I've found the following ---- "Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at file:///f:/pu/dt/share/sites/main/en/welcome.htm. (Reason: CORS request not http)." 6. I have diagnosed that changing the value of 'privacy.file_unique_origin' from 'true' to 'false' enables the website to run as designed and as it runs on the remote server. 7. I understand that leaving this change in place creates a security risk, but continually changing it is annoying.


QUESTIONS:

1. Can this setting, or another one, be changed by the software allowing the website to run? (I guess not as then the rule is ineffective). 2. Can a change in structure or syntax to a local file website be made that will not fall foul of the prohibition on running local files? 3. How do developers do it?

SITUATION: 1. I am trying to run a website from a usb external drive (Windows 10, 32-bit, Firefox 80), and it does not run completely. 2. I can run the index.htm file to show the static part of the page, so the css is being read. The variable part of the page is determined by options that then runs other files, and this content is missing. The content is provided by htm and js files. 3. I knows that the code works because the website works when run on a remote server. 4. The same happens with Chrome and Edge. 5. Using the debugger, I've found the following ---- "Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at file:///f:/pu/dt/share/sites/main/en/welcome.htm. (Reason: CORS request not http)." 6. I have diagnosed that changing the value of 'privacy.file_unique_origin' from 'true' to 'false' enables the website to run as designed and as it runs on the remote server. 7. I understand that leaving this change in place creates a security risk, but continually changing it is annoying. QUESTIONS: 1. Can this setting, or another one, be changed by the software allowing the website to run? (I guess not as then the rule is ineffective). 2. Can a change in structure or syntax to a local file website be made that will not fall foul of the prohibition on running local files? 3. How do developers do it?