SEO之片面理解: 1 检索词的权重(最为重要) 2 适应大部分用户的搜索习惯
下面列举了搜集到的搜索方法
1 and
最常见的搜索规则
Nofollow属性一般处理不希望搜索引擎继续爬行的URL上面,因为会传递权重 | |
<a href="https://minkabu.jp/top/truste" target="_blank" rel="nofollow"> | |
<font style="vertical-align: inherit;"> | |
<font style="vertical-align: inherit;">隐私声明 | |
</font> | |
</font> | |
</a> |
在非关键页面的head中加入,链接到关键地址(希望用户可以搜索到的地址) | |
<link rel="canonical" href="https://itf.minkabu.jp/login"> | |
如果规范网页有移动版,请为其添加 rel="alternate" 链接,并使该链接指向此网页的移动版: | |
<link rel="alternate" media="only screen and (max-width: 640px)" href="http://m.example.com/dresses/green-dresses"> | |
SEO之片面理解: 1 检索词的权重(最为重要) 2 适应大部分用户的搜索习惯
下面列举了搜集到的搜索方法
1 and
最常见的搜索规则
1 view 页面显示 | |
<button id="floor_price_<%=product.id%>" onclick="get_floor_price(<%=product.id%>)">获取最低价</button> | |
2 view页面添加 ajax | |
<script> | |
function get_floor_price(p_id){ | |
url = "/admin/products/floor_price/" + p_id | |
$.ajax({ |
<script src="https://cdn.bootcss.com/jquery/3.4.0/jquery.min.js"></script>
<h1 id='mico1' style='display: none'></h1>
<h1 id='mico2' style='display: block'>micomico</h1>
<button onclick="mico()">切换</button>
<script>
function mico(){
页面可能添加一些弹出界面,但是不常用,页面可以先不渲染,我们可以利用bootstrap的toggle方法,加上jquery的replaceWith进行页面替换 | |
1 目标页面 | |
(1) <a data-target="#subModal" data-toggle="modal" id="edit_trigger"></a> | |
(或者直接换成一个button,主页面点击的时候,也可以起到效果 . <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#subModal">Large modal</button>) | |
(2) 预留一个空的div(此处就是不用提前渲染内容位置) | |
<div id="vehicleModal"> | |
</div> | |
2 任意局部页面 |
Rails 开发很多时候想要吧一些独立的业务处理单独写在一个 log 文件.
Rails 想要新建一个单独的 log 文件是很简单的。
这里我利用单独 logger 来纪录 resque worker 的一些事情。
首先建立一个 logger model
class WorkerLogger < Logger
objc[3032]: +[__NSPlaceholderDictionaryinitialize] may have been in progress in another thread when fork() was called.We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug. | |
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY='YES' >> ~/.bash_profile | |