我需要在与PHP共享的主机上 主办我的铬扩展
我知道我的服务器必须使用适当的 HTTP 信头 : < a href="http://code.google.com/chrome/extensions/hosting.html" rel="noreferr" >code.google.com/chrome/extensions/hosting.html
但是,如何设置我的服务器 发送这些信头 上瘾到. crx文件?
我需要在与PHP共享的主机上 主办我的铬扩展
我知道我的服务器必须使用适当的 HTTP 信头 : < a href="http://code.google.com/chrome/extensions/hosting.html" rel="noreferr" >code.google.com/chrome/extensions/hosting.html
但是,如何设置我的服务器 发送这些信头 上瘾到. crx文件?
如果您在一个共享的主机上, 无法更改服务器配置, 请使用 PHP:
<?php
$file = extension.crx ;
if (file_exists($file)) {
header( Content-Description: File Transfer );
header( Content-Type: application/x-chrome-extension );
header( Content-Disposition: attachment; filename= .basename($file));
header( Content-Transfer-Encoding: binary );
header( Expires: 0 );
header( Cache-Control: must-revalidate );
header( Pragma: public );
header( Content-Length: . filesize($file));
ob_clean();
flush();
readfile($file);
exit;
}
?>
这将强制下载文件( 由 $file
file 变量指定), 由自定义信头下载 。
我不知道你在使用什么网络服务器,但对于阿帕奇来说,你可以做以下工作:
/path/to/your/httpd/conf/mime.types
application/x-chrome-extension crx
at the end of the filekillall -HUP httpd
或者您可以尝试将此行添加到您的 .ht access
文件 :
AddType application/x-chrome-extension crx
并且应该有效!
self.location = cache: + self.location I want to redirect from "[URL]" to "cache:[URL]". I just want this code to work in Chrome browser.
I m在4号 Chrome(目前为4.0.249.0)中开发一个延伸点,显示用户在地位酒吧中的形象。 Ive设计了一个供用户使用的备选办法网页......
I ve tried the following: (this is actually for fancybox, as the overlay does not show in chrome/safari: $("#fancy_overlay").css({<br /> background-color : opts....
Project: Developing a gadget template for Google Wave which will allow my Flash movies to interact with the Wave api. I had to adapt the existing Flex application so that it would work with ...
$( img ).height() returns 0 in chrome, but it returns the actual height in IE and firefox. Whats the actual method to get the height of the image in chrome?
I am trying to view a page in Google Chrome, but I get the message: "Aw, Snap! Something went wrong while displaying this web page". Is there a way to get more information about what went wrong? ...
I wanna move a div block to the top, so I coded like this: CSS part: .movingPart{ margin-top:80px; } jQuery part: $(document).ready(function() { $( #btn ).click(function() { $( .movingPart )....
On the following code, COL1A and COL3A are not 50% height with Chrome or Webkit. It works fine with IE7 and Firefox. <table border="1"> <tr> <td height="100%">COL 1A</td>...