在远程链接奇怪的下划线参数 [英] Strange underscore param in remote links
问题描述
我用Rails3,jQuery和will_paginate gem是项目进行远程分页链接。对于这种已知的解决方案是:
I use Rails3, JQuery and will_paginate gem to make remote pagination links. Known solution for this is:
$('.pagination a').live('click',function (){
$.getScript(this.href);
return false;
});
通过这个code我得到这样的链接:的http://本地主机:3000 /产品_ = 1300468875819&放大器;页面= 1
或 HTTP://本地主机:3000 /产品_ = 1300468887024&放大器;网页= 2
?。就这样,小问题是:这是什么奇怪的参数 _ = 1300468887024
(看起来像Unix的时间)。其目的是什么?当我知道这可能会导致一些问题的搜索爬虫。
With this code I get links like: http://localhost:3000/products?_=1300468875819&page=1
or http://localhost:3000/products?_=1300468887024&page=2
. So the little question is: what is this strange param _=1300468887024
(looks like Unix-time). What is its purpose? As I know this can cause some problems with search crawlers.
UPD :该解决方案描述<一个href="http://stackoverflow.com/questions/5022557/jquery-version-1-5-ajax-script-tag-timestamp-problem">here.
推荐答案
这是一个的缓存克星。它也适用于开发模式,因此,以避免从浏览器缓存中的旧的请求。
it's a cache buster. It's also used in development mode, so to avoid getting an old request from the browser cache.
(不幸的是,我找到了解释realated到广告:S)
(unfortunately, all the explanations I found are realated to advertisement :S)
这篇关于在远程链接奇怪的下划线参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!