首页 文章 精选 留言 我的

精选列表

搜索[火狐浏览器],共10000篇文章
优秀的个人博客,低调大师

Chromium Edge 浏览器中新的跟踪防御功能

本月初,微软发布了首个ChromiumEdge 的发布候选版本。在最新版本中,添加了一项名为Tracking Prevention 的限制性功能,以进一步提高网络安全性。 实际上,微软早在 2011 年就向 Internet Explorer 9 添加了跟踪保护功能,它使用跟踪保护列表(TPL)来允许或阻止来自特定域的第三方请求。 新版Edge 的跟踪防御功能与其原理相同,但是更加实用且更加完善,它用多个“信任保护列表”代替了单个 TPL。微软尚未发布有关此功能的正式文档,也没有明显的方法可以自定义其操作或用第三方替代品替换内置列表。 如果你正在运行新的 Edge,可以在“隐私和服务”标题下的 “Edge 设置”页面上找到 “Tracking Prevention”。默认情况下,“防跟踪”处于启用状态,并且“平衡”设置处于选中状态。 根据微软的说法,该设置“阻止了潜在有害的跟踪程序和来自未访问站点的跟踪程序”,“将其设置为‘严格’模式会阻止所有网站上的大多数跟踪器,但也可能会导致某些网站的运行不正常。” 外媒 ZDNet 的记者 Ed Bott对新功能进行了测试,他发现本地的受信任配置列表中包含多个文件夹,这些文件标识了已知的跟踪器,每并且都已按广告、指纹、社交等等分好了类别。 Bott 从各式各样的网站加载了 66 页内容。测试结果显示,使用默认的“平衡”设置,Tracking Prevention 总共阻止了 2,318 个跟踪器,或者说平均每页 35 个。其中有 552 个来自 Google 域,占比 23.8%。但将模式调整为“严格”后,Edge 总共阻止了 739 个跟踪器,比“平衡”模式要少得多。 为什么会有所不同?在“平衡”设定中,Edge 会封锁大量跟踪程序的储存空间存取权,这意味着这些域可以加载内容,但不能设置或检索 Cookie。其他一小组较小的第三方域被阻止加载任何资源。相比之下,在“严格”模式中,Edge 针对大量类别阻止了存储访问和资源加载,并且完全阻止了诸如跟踪像素、iframe 和脚本之类的元素加载和获取其他资源。 单击地址栏左侧的挂锁图标,可以查看特定页面阻止了哪些跟踪器。该操作将显示一个下拉菜单,它可以关闭页面的跟踪器阻止功能,或展开列表以查看阻止的跟踪器来自何处。这一功能目前还在测试中,但相信不少开发人员和用户都想询问:是否可以对它进行扩展和自定义? 消息来源:https://www.zdnet.com/article/with-its-new-edge-browser-microsoft-takes-dead-aim-at-google/

优秀的个人博客,低调大师

Android使用TBS浏览器加载pdf等文件

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qingfeng812/article/details/79077350 项目结构 技术方案 TBS的其它优点,可以自行搜索网上其它资料,很多。 加载文件核心类是 TbsReaderView,腾讯文档没有写,所以需要查找网上资料。 TBS目前只支持加载本地文件。所以远程文件需要先下载,后用TBS加载文件显示。 负责加载和显示文件的界面,离开本界面之后务必需要销毁,否则再次加载文件无法加载成功,会一直显示加载文件进度条。 关键代码: mTbsReaderView.onStop();//销毁界面的时候一定要加上,否则后面加载文件会发生异常。 完整项目源码 package com.yifeng.sample.tbs; import android.app.DownloadManager; import android.app.DownloadManager.Request; import android.content.Intent; import android.database.ContentObserver; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.os.Environment; import android.os.Handler; import android.support.v7.app.AppCompatActivity; import android.text.TextUtils; import android.util.Log; import android.view.View; import android.view.ViewGroup.LayoutParams; import android.widget.Button; import android.widget.RelativeLayout; import com.tencent.smtt.sdk.TbsReaderView; import com.tencent.smtt.sdk.TbsReaderView.ReaderCallback; import java.io.File; public class MainActivity extends AppCompatActivity implements ReaderCallback { private TbsReaderView mTbsReaderView; private Button mDownloadBtn; private DownloadManager mDownloadManager; private long mRequestId; private DownloadObserver mDownloadObserver; private String mFileUrl = "http://www.beijing.gov.cn/zhuanti/ggfw/htsfwbxzzt/shxfl/fw/P020150720516332194302.doc"; private String mFileName; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mTbsReaderView = new TbsReaderView(this, this); mDownloadBtn = (Button) findViewById(R.id.btn_download); RelativeLayout rootRl = (RelativeLayout) findViewById(R.id.rl_root); rootRl.addView(mTbsReaderView, new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); mFileName = parseName(mFileUrl); if (isLocalExist()) { mDownloadBtn.setText("打开文件"); } if (isLocalExist()) { mDownloadBtn.setVisibility(View.GONE); displayFile(); } else { startDownload(); } } @Override public void onBackPressed() { startActivity(new Intent(MainActivity.this,IndexActivity.class)); finish();//不关掉此界面,之后加载文件会无法加载 } public void onClickDownload(View v) { // if (isLocalExist()) { // mDownloadBtn.setVisibility(View.GONE); // displayFile(); // } else { // startDownload(); // } } private void displayFile() { Bundle bundle = new Bundle(); bundle.putString("filePath", "/storage/emulated/0/uu/HTTP权威指南.pdf"); bundle.putString("tempPath", Environment.getExternalStorageDirectory().getPath()); boolean result = mTbsReaderView.preOpen(parseFormat("HTTP权威指南.pdf"), false); if (result) { mTbsReaderView.openFile(bundle); } } private String parseFormat(String fileName) { return fileName.substring(fileName.lastIndexOf(".") + 1); } private String parseName(String url) { String fileName = null; try { fileName = url.substring(url.lastIndexOf("/") + 1); } finally { if (TextUtils.isEmpty(fileName)) { fileName = String.valueOf(System.currentTimeMillis()); } } return fileName; } private boolean isLocalExist() { return getLocalFile().exists(); } private File getLocalFile() { return new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS), mFileName); } private void startDownload() { mDownloadObserver = new DownloadObserver(new Handler()); getContentResolver().registerContentObserver(Uri.parse("content://downloads/my_downloads"), true, mDownloadObserver); mDownloadManager = (DownloadManager) getSystemService(DOWNLOAD_SERVICE); DownloadManager.Request request = new DownloadManager.Request(Uri.parse(mFileUrl)); request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, mFileName); request.allowScanningByMediaScanner(); request.setNotificationVisibility(Request.VISIBILITY_HIDDEN); mRequestId = mDownloadManager.enqueue(request); } private void queryDownloadStatus() { DownloadManager.Query query = new DownloadManager.Query().setFilterById(mRequestId); Cursor cursor = null; try { cursor = mDownloadManager.query(query); if (cursor != null && cursor.moveToFirst()) { //已经下载的字节数 int currentBytes = cursor.getInt(cursor.getColumnIndexOrThrow(DownloadManager.COLUMN_BYTES_DOWNLOADED_SO_FAR)); //总需下载的字节数 int totalBytes = cursor.getInt(cursor.getColumnIndexOrThrow(DownloadManager.COLUMN_TOTAL_SIZE_BYTES)); //状态所在的列索引 int status = cursor.getInt(cursor.getColumnIndex(DownloadManager.COLUMN_STATUS)); Log.i("downloadUpdate: ", currentBytes + " " + totalBytes + " " + status); mDownloadBtn.setText("正在下载:" + currentBytes + "/" + totalBytes); if (DownloadManager.STATUS_SUCCESSFUL == status && mDownloadBtn.getVisibility() == View.VISIBLE) { mDownloadBtn.setVisibility(View.GONE); mDownloadBtn.performClick(); } } } finally { if (cursor != null) { cursor.close(); } } } @Override public void onCallBackAction(Integer integer, Object o, Object o1) { } @Override protected void onDestroy() { super.onDestroy(); mTbsReaderView.onStop(); if (mDownloadObserver != null) { getContentResolver().unregisterContentObserver(mDownloadObserver); } } private class DownloadObserver extends ContentObserver { private DownloadObserver(Handler handler) { super(handler); } @Override public void onChange(boolean selfChange, Uri uri) { Log.i("downloadUpdate: ", "onChange(boolean selfChange, Uri uri)"); queryDownloadStatus(); } } }

优秀的个人博客,低调大师

haproxy根据客户端浏览器进行跳转

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 根据手机端 acliphonehdr_sub(user-agent)-iiphone redirectprefix if iphone aclandroidhdr_sub(user-agent)-iandroid redirectprefix if android 根据访问后缀 acltest_picpath_end.gif.png.jpg.css.js use_backendnginxpools if test_pic 根据访问开始路径来匹配 acltest_staticpath_beg /html/ aclhd_domhdr(Host)-i test .com -i忽略大小写 hdr是函数 methodhttp方法 req_ver请求版本 resp_ver响应版本 statushttp状态 url精确匹配url url_reg正则匹配 url_dir斜线之间 url_dom斜线之间或点之间 在haproxy匹配的时候根据use_backend先后顺序进行匹配 Haproxy健康检查方式 1.基于端口的健康检查方式 checkport80 2.基于http的 head 的ipurl健康检查方式 optionhttpchkHEEAD /health .txtHTTP /1 .0 serverweb1192.168.1.2:80maxconn20480weight8checkinter3000fall2rise2 3.基于http的get的健康检查方式 optionhttpchkGET /health .txt 4.基于具体业务域名的URL健康检查 optionhttpchkHEAD /index .jspHTTP /1 .1\r\nHost: optionhttpchkGET /index .jspHTTP /1 .1\r\nHost:www. test .com haproxy中backup参数的使用 本文转自 rong341233 51CTO博客,原文链接:http://blog.51cto.com/fengwan/1689112

资源下载

更多资源
Mario

Mario

马里奥是站在游戏界顶峰的超人气多面角色。马里奥靠吃蘑菇成长,特征是大鼻子、头戴帽子、身穿背带裤,还留着胡子。与他的双胞胎兄弟路易基一起,长年担任任天堂的招牌角色。

腾讯云软件源

腾讯云软件源

为解决软件依赖安装时官方源访问速度慢的问题,腾讯云为一些软件搭建了缓存服务。您可以通过使用腾讯云软件源站来提升依赖包的安装速度。为了方便用户自由搭建服务架构,目前腾讯云软件源站支持公网访问和内网访问。

Nacos

Nacos

Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 的首字母简称,一个易于构建 AI Agent 应用的动态服务发现、配置管理和AI智能体管理平台。Nacos 致力于帮助您发现、配置和管理微服务及AI智能体应用。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据、流量管理。Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。

Sublime Text

Sublime Text

Sublime Text具有漂亮的用户界面和强大的功能,例如代码缩略图,Python的插件,代码段等。还可自定义键绑定,菜单和工具栏。Sublime Text 的主要功能包括:拼写检查,书签,完整的 Python API , Goto 功能,即时项目切换,多选择,多窗口等等。Sublime Text 是一个跨平台的编辑器,同时支持Windows、Linux、Mac OS X等操作系统。

用户登录
用户注册