I'm working on a project that is meant to speed up the load time of a website. Basically, what I need to do is translate a javascript module and save the output to a database.
I've tried using javax.script.*, but the modules use implicit objects (such as "navigator"), so when I try to evaluate the modules my app crashes. Is there any way around this? Possibly using other tools such as Python/Ruby???
Program outline:
1. grab module from file or url 2. interpret module and capture output 3. save output to database
An example of one of the modules I'm working with: Javascript module
Any comments, suggestions are welcome...I'm up against a brick wall here.
'm working on a project that is meant to speed up the load time of a website.
Perhaps you should explain what you mean by this.
If you are trying to "speed up the load time" by running the JavaScript on the server before it gets to the page, well, that's just not going to be possible.
Zack Lamm
Greenhorn
Joined: Aug 04, 2007
Posts: 3
posted
0
No, I haven't tried jWebUnit, does it support javascript? I tried using httpunit, but it has limited javascript support. Simulating a web environment is exactly what I want to do. Basically, all I need is the javascript module to run through a browser so I can capture the output, like I said before, I need everything that's produced from the document.write() statements. That's what goes into the database: the actual content that's produced from the javascript module.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35252
7
posted
0
I don't fully understand what you're trying to do, but I prefer jWebUnit over HttpUnit. It has much better support for DOM and JavaScript, and also operates on a higher level, which makes for a more pleasant development experience.