WebParser measure ignores UserAgent, Header, Flags options with Download=1.
This is not a big issue, but I would like to know if this is the expected behavior.
Code: Select all
[Rainmeter]
Update=-1
AccurateText=1
[Variables]
URL=http://builds.rainmeter.net/
[MeasureWebParser]
Measure=WebParser
URL=#URL#
Download=1
DownloadFile=temp.txt
Flags=Resync | NoCookies
Header=Cache-Control: no-store
Header2=DNT: 1
Header3=Connection: close
UserAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:93.0) Gecko/20100101 Firefox/93.0
[MeterString1]
Meter=String
Text=Onett
Antialias=1
SolidColor=333333FF
FontColor=FFFFFFFF
FontSize=16
Padding=4,0,4,0
Rainmeter log - WebParser measure option Download=1
> [Manage Rainmeter] window > [Settings] tab > [x] Debug mode Rainmeter log says: Useragent="Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:93.0) Gecko/20100101 Firefox/93.0" with WebParser measure option Download=1,
but it is different from the User-Agent that a network packet analyzer recorded.
My goal is - Downloading about 20 image files from a web server using webparser measure on every 10 minutes.
1. Reduce the network usage. 2. Reduce a response time of a WebParser.
My problem is - WebParser measure ignores Flags=Resync option when Download=1 is set.
So WebParser force download the same files even if the files are not modified, the cache files are not used.
WebParser cache location: %LOCALAPPDATA%\Microsoft\Windows\INetCache
Rainmeter Docs wrote:Flags=Resync: Only downloads if the resource has been modified since the last time it was downloaded. Otherwise the cache is used. This is the default if no Flags are set.
Code: Select all
Rainmeter 4.5.4.3550 (64-bit)
Language: English (1033)
Build time: 2021-10-04 9:25:19
Windows 10 Pro 1909 64-bit (build 18363) - Japanese (1041)
Path: Z:\Apps\Rainmeter\
SkinPath: Z:\Apps\Rainmeter\Skins\
SettingsPath: Z:\Apps\Rainmeter\
IniFile: Z:\Apps\Rainmeter\Rainmeter.ini
Edited: Oct. 13, 2021
There isn't registry entry named SyncMode5 in my Windows 10.MeasureWebParser.cpp wrote: https://github.com/rainmeter/rainmeter/blob/master/Library/MeasureWebParser.cpp#L1025
// Delete IE cache before download if "SyncMode5" is not 3 (every visit to the page)
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
I don't understand C++ codes but It seems that the WebParser is designed to force download files when Download=1.
WebParser Flags option - Rainmeter Docs
rainmeter/Library/MeasureWebParser.cpp - GitHub
HTTP headers - MDN Web Docs