Firefox参数调整

系统信息

firefox 142.0.1 (64-bit)

librewolf 143.0-1 (64-bit)

win11

使用user.js增强Firefox

自定义部分

  • 放置于user.js的 START: MY OVERRIDES 部分
  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
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119

// ==========================================================================
// 高性能优化配置 - 注意:以下设置会覆盖部分原始配置
// ==========================================================================

/** 1. 缓存最大化 (MAXIMUM MEMORY CACHING) **/
// 增大内存缓存容量(单位 KB,设为 1GB
user_pref("browser.cache.memory.capacity", 1048576); 
user_pref("browser.cache.memory.max_entry_size", 40960); 

// 媒体内存缓存 (单位 KB,设为 1GB)
user_pref("media.memory_cache_max_size", 1048576);
user_pref("media.memory_caches_combined_limit_kb", 4194304); // 组合限制 (4GB)

// 图片缓存 (单位 KB,设为 128MB)
user_pref("image.cache.size", 131072000); 

// 增加会话历史记录中的页面数量 (快速回退/前进)
user_pref("browser.sessionhistory.max_total_viewers", 8); 

/** 2. 核心 CPU/GPU 处理与并行进程 (AGGRESSIVE PROCESSING) **/
// 增加并行页面处理进程数(已从默认值覆盖)
user_pref("dom.ipc.processCount", 16); 
user_pref("dom.ipc.processCount.webIsolated", 16); 

// 增加 Web Worker 最大并行线程数
user_pref("dom.workers.maxParallelThreads", 32); 
// 禁用脚本执行时间限制 (极限性能设置)
user_pref("dom.max_script_run_time", 0); 

/** 3. 网络并发与连接 (MAXIMUM NETWORK CONCURRENCY) **/
// 总连接数 (已从默认值覆盖)
user_pref("network.http.max-connections", 3000); 
// 每服务器持久连接数 (已从默认值覆盖)
user_pref("network.http.max-persistent-connections-per-server", 24); 
user_pref("network.http.max-persistent-connections-per-proxy", 32);

// 增大 DNS 缓存条目并延长缓存时间 (已从默认值覆盖)
user_pref("network.dnsCacheEntries", 40000); 
user_pref("network.dnsCacheExpiration", 86400); 

// 尽快启动请求 (已从默认值覆盖)
user_pref("network.http.request.max-start-delay", 0); 

/** 4. 图形渲染与视频 (GPU/Rendering) **/
// 强制启用 GPU 渲染和加速 (您已覆盖默认配置)
user_pref("gfx.webrender.all", true);
user_pref("gfx.webrender.precache-shaders", true);
user_pref("layers.acceleration.force-enabled", true);
user_pref("webgl.disabled", false);
user_pref("media.hardware-video-decoding.force-enabled", true);

// 增加 WebGL 缓存大小 (已从默认值覆盖)
user_pref("webgl.max-size", 32768); 
// 增大 GPU 图层缓存
user_pref("layers.gpu-process.max-memory-MB", 512);

/** 5. 滚动与动画 (SMOOTHFOX Core) - 优化平滑度 **/

// --- 平滑滚动核心配置 (增强) ---
user_pref("general.autoScroll", true); // 启用自动平滑滚动
user_pref("general.smoothScroll", true); // 强制启用平滑滚动
user_pref("general.smoothScroll.msdPhysics.enabled", true); // 启用微软风格的平滑滚动物理引擎
user_pref("mousewheel.min_line_scroll_amount", 40); // 滚轮最小滚动行数
user_pref("apz.overscroll.enabled", true); // 启用 APZ 滚动超限(平滑效果)

// --- 平滑滚动参数细调 (增强平滑度) ---
user_pref("mousewheel.default.delta_multiplier_y", 250); // 调整滚动速度 (可根据您的喜好调整,250 较快)
user_pref("general.smoothScroll.mouseWheel.durationMinMS", 80); // 最小动画持续时间 (越小越快)
user_pref("general.smoothScroll.mouseWheel.durationMaxMS", 250); // 最大动画持续时间 (越大越平滑/拖沓)
user_pref("general.smoothScroll.mouseWheel.migrationRatio", 95); // 滚动平滑度 (95-99 之间,越大越平滑)

// --- 动画减少/移除 ---
user_pref("browser.tabs.animate", false);
user_pref("ui.prefersReducedMotion", 1); 

// --- 全屏动画加速/移除 (新增) ---
user_pref("full-screen-api.transition-duration.enter", "0 0"); // 进入全屏过渡时间 (格式: '时间 延迟')
user_pref("full-screen-api.transition-duration.leave", "0 0"); // 退出全屏过渡时间

/** 6. 性能/兼容性/其他 **/
user_pref("privacy.resistFingerprinting", false); 
user_pref("media.peerconnection.ice.relay_only", false); 

// 字体渲染优化 [WINDOWS] (您已覆盖默认配置)
/** 思源宋体字体优化配置 **/
// 设置默认字体为思源宋体
user_pref("font.name.serif.zh-CN", "Source Han Serif SC");
user_pref("font.name.serif.zh-TW", "Source Han Serif TC");
user_pref("font.name.serif.zh-HK", "Source Han Serif HC");
user_pref("font.name.serif.ja-JP", "Source Han Serif JP");
user_pref("font.name.serif.ko-KR", "Source Han Serif KR");

// 设置等宽字体(保持原有或适当调整)
user_pref("font.name.monospace.zh-CN", "Source Han Serif SC");
user_pref("font.name-list.monospace.zh-CN", "Source Han Serif SC, SimSun, MingLiU");

// 字体回退设置
user_pref("font.name-list.serif.zh-CN", "Source Han Serif SC, SimSun, Microsoft YaHei");
user_pref("font.name-list.sans-serif.zh-CN", "Microsoft YaHei, SimHei, Source Han Sans SC");

// 字体渲染优化(针对宋体特性调整)
user_pref("gfx.font_rendering.cleartype_params.rendering_mode", 3); // 修改为3,更适合宋体
user_pref("gfx.font_rendering.cleartype_params.enhanced_contrast", 100); // 提高对比度,宋体需要更清晰的笔画
user_pref("gfx.font_rendering.cleartype_params.gamma", 2200); // 调整gamma值
user_pref("gfx.font_rendering.cleartype_params.pixel_structure", 1); // 适合宋体的像素结构

// 禁用字体缩放和替换
user_pref("font.size.variable.zh-CN", 16);
user_pref("browser.display.use_document_fonts", 1); // 允许页面使用自己的字体
user_pref("browser.display.use_system_fonts", 0); // 不使用系统字体

// 字体平滑设置
user_pref("gfx.canvas.accelerated", true);
user_pref("gfx.content.azure.backends", "direct2d1.1,cairo");
user_pref("gfx.font_rendering.cleartype_params.cleartype_level", 100);
user_pref("gfx.font_rendering.directwrite.use_gdi_table_loading", true);
user_pref("gfx.font_rendering.cleartype_params.enhanced_contrast", 100);
user_pref("browser.newtabpage.activity-stream.showWeather", true);
  • 地址栏输入指令进入配置文件
1
about:profiles
  • 选择正在使用的配置文件 打开根目录(Root Directory)文件夹
  • 关闭 Firefox
  • 将user.js文件移动到文件夹中
  • 开启 Firefox 输入about:config搜寻自定义部分的任意项目可以注意到已经修改成功了

给Firefox添加hevc支持

https://hevc-video-extensions-from-device-manufacturer.en.uptodown.com/windows/download

You can test out here some videos for hevc, and some other unknown ones.

https://lf-tk-sg.ibytedtos.com/obj/tcs-client-sg/resources/video_demo_hevc.html

This also can tell if your browser supports it or not.

https://ott.dolby.com/codec_test/index.html

打开 powershell 进入appxbundle文件下载目录 执行指令安装 安装后重启电脑

1
Add-Appxpackage extensiones-de-video-hevc-del-fabricante-del-dispositivo-2-4-13-0.appxbundle

References

Licensed under CC BY-NC-SA 4.0