问题标签 [requestreduce]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
348 浏览

.net - RequestReduce And ReWriting CSS Paths

I've recently implemented RequestReduce on a site we have in development.

It's working well except for one behavior that's proving problematic. I noticed that ReduceRequest rewrites the paths of background images, for example, to be a full path instead of relative. This is a problem for this application because it contains a css style (from a common, shared site and style sheet, via a virtual directory) that contains an .htc file fix for IE pngs. (I know, I know, don't ask me why we still do this).

When RequestReduce re-writes the style, the style becomes

(_common is a virtual directory to our common includes site)

This throws a permission denied error in IE as you can't use htc from an external domain the way I understand it (it does function as expected without the domain).

enter image description here

So I've been trying to come up with a way to have RequestReduce not re-write the CSS rules to add domain. Parsing through the documentation I came across this:

https://github.com/mwrock/RequestReduce/wiki/The-RequestReduce-Api (specifically, the section labelled Transforming the URLs generated by RequestReduce)

The API seems to indicate this can be done with something like the following:

But so far, I've never seen this work. It never actually replaces the domain portion with nothing as I'm requesting.

I've also posted on this bug thread which seems to indicate that there is an issue with this functionality: https://github.com/mwrock/RequestReduce/issues/177

Does anyone have any experience with ReduceRequest and URL transformations? I'm hoping to verify I'm not doing anything improperly as I'm pretty new to the tool. This tool would be a definite win for our applications so I'm hoping to be able to work around this.

Thanks for any help you can offer.

0 投票
1 回答
433 浏览

asp.net-mvc-3 - Appharbor URL 中的端口号导致页面/内容无法加载

在 AppHarbor 上,以标准 Asp .Net 方式生成当前绝对 URL 会生成以下格式的 URL:

从浏览器访问时,此 URL 失败 -删除端口号可修复此问题

我相当有信心,情况并非总是如此,这种变化现在导致我的应用程序出现问题。

我知道我可以使用辅助方法正确创建 URL,但是,在 3rd 方插件(例如 RequestReduce)中,这是无法控制的。

有谁知道一种在全球范围内改变这种情况的方法,这样端口号就永远不会生成?

0 投票
1 回答
286 浏览

asp.net - RequestReduce - 如何使用它?

我似乎无法理解 RequestReduce 是如何工作的。我已经通过 NuGet 安装了所有组件,除了我不需要的 SQL 功能。现在我还应该做什么,我通过 IIS Express 运行我的网站,它不会生成任何 js 和 css 文件,也不会产生任何错误。我究竟应该如何使用它?

我正在用 ASP.NET 4.5 和 Visual Studio 2012 开发我的网站。

0 投票
1 回答
208 浏览

requestreduce - 切换到 https 后,request reduce 模块停止工作

基本上我们已经使用下面的链接几个月了,没有任何问题。基本上将 ddl 添加到 bin 中,然后将 2 行添加到 web.config 中,然后它就消失了。

https://github.com/mwrock/RequestReduce

当我们完成自签名证书进行测试并将所有页面重定向到 https 时,问题就出现在我们的上线前环境中。基本上请求减少模块停止输出文件。

有人有这个问题吗?

查看仪表板后,出现一个命令异常,即“底层连接已关闭 - 无法为 SSL/TLS 安全通道建立信任关系”

还是卡住了。。

谢谢罗伯

0 投票
0 回答
108 浏览

asp.net - RequestReduce PageFilter 适用于 http 但不适用于 https

我正在使用 RequestReduce ( http://requestreduce.org/ ) 来捆绑和缩小,但有一个奇怪的问题。

我正在使用页面过滤器从 RequestReduce 处理中排除我的网站的一部分,如下所示:

但是,虽然当我通过 http 访问该站点时这工作正常,但在通过 https 访问时,它似乎仍然提供“精简”内容。我在这里错过了什么明显的东西吗?

编辑:如果它与斜杠或 RawUrl 的使用有关,我也尝试了以下方法。没有骰子。不幸的是,无论我为页面过滤器添加什么内容,RequestReduce 似乎都盲目地在所有 https 页面上运行:

0 投票
1 回答
331 浏览

css - 如何让 SASS 与 RequestReduce 一起工作?

我有一个我们已经开始工作的新网站,需要有工作的 SASS 组合/缩小。

目前,我们在大多数项目中都使用 RequestReduce,因此我了解该产品。

我已经通过 nuget 提要安装了 RequestReduce 及其 less/sass/coffeescript 插件。Requestreduce 仪表板工作正常,可以处理我添加的任何 css 或更少的文件。所以 less/css/javascript 工作正常。

当我尝试添加一个 scss 文件时,仪表板说它得到一个 404。如果我通过浏览器手动请求该文件,我得到:

所以文件路径是正确的,但没有处理程序来处理 scss 文件。nuget 为 web.config 中的 less 文件添加了一个处理程序,但没有为 scss 添加一个处理程序。在 IIS 中添加 mime 类型可以消除该错误,但这只会将 scss 作为纯文本添加到文档中,因此这不是解决方案。在这种情况下,RequestReduce 不会编译文件。

任何人都知道如何让 RequestReduce 获取 sass 文件并编译/缩小它?任何帮助appriciated!