Цей вебсайт матиме обмежену функціональність, доки ми проводимо його обслуговування для поліпшення роботи. Якщо прочитана стаття не розв'язала вашу проблему і ви хочете поставити питання, наша спільнота підтримки з радістю допоможе вам на @FirefoxSupport у Twitter та /r/firefox на Reddit.

Шукати в статтях підтримки

Остерігайтеся нападів зловмисників. Mozilla ніколи не просить вас зателефонувати, надіслати номер телефону у повідомленні або поділитися з кимось особистими даними. Будь ласка, повідомте про підозрілі дії за допомогою меню “Повідомити про зловживання”

Докладніше

Ця тема перенесена в архів. Якщо вам потрібна допомога, запитайте.

Firefox can't find javascript files on localhost

  • 2 відповіді
  • 34 мають цю проблему
  • 1 перегляд
  • Остання відповідь від Arfon Parry

more options

I'm running firefox 21.0 on windows 8. I've installed Apache 2.4 (64 bit) as a web server on localhost.

I'm getting sporadic unexpected results testing my web pages. When I look at the source code (Ctrl-U) and click on the link to the javaScript files, for some of the files I get the firefox warning page (with exclamation mark in yellow triangle - not the 404 message) claiming that firefox cannot find the javaScript file. The files do exist and capitalization is correct.

The links are coded like this: <script type="text/javascript" src="/cradur/JSLib/dataGrid.js" charset="utf-8"></script> The web page is xhtml1-strict.

IMPORTANT: THIS ERROR IS ONLY OCCURRING SPORADICALLY. The web page (and JS file) will work fine for a time, then suddenly firefox will no longer be able to find the file.

Please note also that the current set up is on a new laptop, which I've only been using for a week. I've previously run firefox/ajax on windows XP for years without encountering this problem.

I'm running firefox 21.0 on windows 8. I've installed Apache 2.4 (64 bit) as a web server on localhost. I'm getting sporadic unexpected results testing my web pages. When I look at the source code (Ctrl-U) and click on the link to the javaScript files, for some of the files I get the firefox warning page (with exclamation mark in yellow triangle - not the 404 message) claiming that firefox cannot find the javaScript file. The files do exist and capitalization is correct. The links are coded like this: <script type="text/javascript" src="/cradur/JSLib/dataGrid.js" charset="utf-8"></script> The web page is xhtml1-strict. IMPORTANT: THIS ERROR IS ONLY OCCURRING SPORADICALLY. The web page (and JS file) will work fine for a time, then suddenly firefox will no longer be able to find the file. Please note also that the current set up is on a new laptop, which I've only been using for a week. I've previously run firefox/ajax on windows XP for years without encountering this problem.

Усі відповіді (2)

more options

Do you use a port number in your localhost URLs? If so, have you noticed any changes to (or omission of) those numbers as you test the application?

Although I don't think you can do a reload bypassing cache (Ctrl+Shift+r) in the source viewer, if you do that in a page that wasn't able to load the script, does that help?

more options

Thanks for yor reply.

No, I don't use a port number in the localhost URL.

Yes a 'reload bypassing cache' (ctrl+shift+r) on the 'warning' window does find the JS source, and the application subsequently runs.

This doesn't explain why Firefox can't find the JS file initially - and will make testing a bit of a minefield.