在IIS服务器上执行javascript [英] Execute javascript on IIS server

查看:218
本文介绍了在IIS服务器上执行javascript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下情况。客户使用JavaScript和jQuery来创建复杂的网站。我们想在服务器(IIS)上使用JavaScript和jQuery,原因如下:


  1. 技能转移 - 我们希望在服务器上使用JavaScript和jQuery,而不必使用例如VB Script。 /经典的asp。 .Net框架/ Java等因此而被排除。


  2. 改进了搜索/可访问性选项。我们希望能够将jQuery用作模板系统,但这对于搜索引擎和关闭js的用户来说是不可行的 - 除非我们可以选择性地在服务器上运行此代码。


在IIS和Windows Server上投入了大量资金,因此不能改变它。



我知道您可以使用Windows脚本主机在IIS上运行jScript,但我不确定其可扩展性和流程。我也不确定这是否可以访问DOM。



这是一个有希望解释情况的图表。我想知道是否有人做过类似的事情?



编辑:我不是在寻找网络架构的评论家,我只是想知道是否有任何操作选项使用javascript将页面的DOM发送到客户端之前的DOM。 和使用Microsoft的IIS作为Java servlet引擎



第一个链接来自John Resig(jQuery的创建者)博客。



2011年8月2日更新



Node.js即将登陆Windows。


I have the following situation. A customer uses JavaScript with jQuery to create a complex website. We would like to use JavaScript and jQuery on the server (IIS) for the following reasons:

  1. Skills transfer - we would like to use JavaScript and jQuery on the server and not have to use eg VB Script. / classic asp. .Net framework/Java etc is ruled out because of this.

  2. Improved options for search/accessibility. We would like to be able to use jQuery as a templating system, but this isn't viable for search engines and users with js turned off - unless we can selectively run this code on the server.

There is significant investment in IIS and Windows Server, so changing that is not an option.

I know you can run jScript on IIS using windows Script host, but am unsure of the scalability and the process surrounding this. I am also unsure whether this would have access to the DOM.

Here is a diagram that hopefully explains the situation. I was wondering if anyone has done anything similar?

EDIT: I am not looking for critic on web architecture, I am simply wanting to know if there are any options for manipulating the DOM of a page before it is sent to the client, using javascript. Jaxer is one such product (no IIS) Thanks.

解决方案

Have a look at bringing the browser to the server, Rhino, and Use Microsoft's IIS as a Java servlet engine.

The first link is from John Resig's (jQuery's creator) blog.

Update August 2 2011

Node.js is coming to Windows.

这篇关于在IIS服务器上执行javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆