Opened 3 years ago

Closed 3 years ago

#12104 closed defect (wontfix)

FF doesn't load through file system (as opposed to through web server)

Reported by: hisaravanankesavan Owned by: jburke
Priority: high Milestone: tbd
Component: Core Version: 1.5
Keywords: dojo.parser, parser, firefox Cc: hisaravanankesavan@…
Blocked by: Blocking:

Description (last modified by bill)

I have attached a sample HTML file "pathtest.html" to this Ticket.

Below is my deployed folder structure with DOjo framework

C:\lib\DOJO\dojo
           \dijit
           \dojox
C:\test\1\pathtest.html  : where i have the sample html file

I Just added a simple dijit text box to this html file. When i open this file in IE 8 it works good as expected. When i open this in FF.3.6.13 its showing error "Could not load 'dojo.parser'; last tried './parser.js'" in FireBug COnsole.

This is the way i referenced the Dojo library inside the html file

<script 
			type="text/javascript" 
			src="../../lib/DOJO/dojo/dojo.js" 
			djConfig="parseOnLoad: true"
			>
</script>	

This is the way i referenced the themes

<style type="text/css">
	@import "../../lib/DOJO/dojo/resources/dojo.css";
	@import "../../lib/DOJO/dijit/themes/tundra/tundra.css";
</style>

More over i alert the dojo.baseUrl before dojo.require("dojo.parser"); to know whats the base Url, in that case it alerts the base url as "../../lib/DOJO/dojo/' which is correct.

As this is a simple one i did not set the baseUrl in the html file
Is there i need to do specific for firefox. I

Dojo version : dojo_1_5_0_003
Browser : FireFox.3.6.13, 3.5.x

Attachments (1)

pathtest.html (654 bytes) - added by hisaravanankesavan 3 years ago.

Download all attachments as: .zip

Change History (4)

Changed 3 years ago by hisaravanankesavan

comment:1 Changed 3 years ago by bill

  • Component changed from Parser to Core
  • Description modified (diff)
  • Owner changed from bill to jburke

I'm not sure if we even support loading from the file system anymore, but passing to James. I think this is an issue with the loader rather than with the parser.

Did this problem start showing up recently, after the AMD refactor? Does your code work correctly on the 1.5 release?

comment:2 Changed 3 years ago by hisaravanankesavan

Hi I finally able to resolve the issue after googling,

By setting below parameter to "false" in FireFox : about:config page

security.fileuri.strict_origin_policy ; false.

i am using the file locally and my Test html is not parallel in structure to dojo widget.

So finally to compile it looks like when ever we need to Reference Dojo library by fileurl with below way ../../Dojo15/dojo/dojo.js, we need to make sure above mentioned parameter is set to true

comment:3 Changed 3 years ago by bill

  • Resolution set to wontfix
  • Status changed from new to closed
  • Summary changed from Could not load 'dojo.parser'; last tried './parser.js' in FF.3.6.13 to FF doesn't load through file system (as opposed to through web server)

OK sounds like we should close this as wontfix because it's not possible for us to change FF's behavior. Glad you found a workaround.

Note: See TracTickets for help on using tickets.