问题描述
我使用jquery我所有的东西阿贾克斯,我不知道这是否是好的,但我用的现在。
我有一个文本输入时,在它的用户类型的字符我称之为服务器端得到一些值,并增加他们的看法。
我用波纹管code正常工作但我要改善它一点。
我怎样才能让这个Ajax调用,使那些想调查我的网页源代码code用户不能看到我所说的吗?
所以基本上我想从页面的源代码是什么网址,什么类型和数据发送我使用躲在这里,这可能吗?
$(函数(){
$(#txtSearch)。KEYUP(功能(EVT){
$阿贾克斯({
URL:/ prethors /用户/ SearchUsers
键入:POST,
数据:文本=+ THIS.VALUE,
成功:函数(结果){
$(#信息搜索结果)prePEND。(&所述; P>中+导致+&下; / P>中);
}
});
});
});
没有,用户将总是能够弄清楚什么叫你在做,如果你将其包含在JavaScript的。
您可以COM preSS和压缩JavaScript,而是一个有决心的人总能找到你的网址电话。
下面是一个JS COM pression网站为例。
I am using jquery for all my ajax thing, I don't know if that is fine but I use that for now.
I have one text input when user type characters in it I call server side get some values and add them on the view.
Code that I use bellow works fine but I want to improve it a little.
How can I make this ajax call so that users that want to investigate my page source code can't see what I call here?
So basically I want to hide from page source what url, what type and data send I use here, is it possible?
$(function () {
$("#txtSearch").keyup(function (evt) {
$.ajax({
url: "/Prethors/Users/SearchUsers",
type: "POST",
data: "text=" + this.value,
success: function (result) {
$("#searchResult").prepend("<p>" + result + "</p>");
}
});
});
});
No, a user will always be able to figure out what calls you are making if you include it in javascript.
You can compress and minify the javascript, but a determined person will always be able to find your url calls.
Here's a js compression site, for example.http://jscompress.com/
这篇关于如何隐藏浏览器页面的源代码jQuery的阿贾克斯细节的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!