m***@cyber-dome.com
2018-11-10 21:19:46 UTC
Hello all,
WordPress has 'invented' a way to avoid caching of static content and force
downloading it every time.
It does so by adding parameters to the file requested. This "feature" is
slowing the page download and create an issue using wget.
For example, a stylesheet is appended with "ver" parameter.
https://condo-farm.com/wp-content/themes/DazChild/style.css?ver=4.8.7
In wget1 the '?' character was replaced with %3F string (Hex value on the
character?) and it worked somehow.
https://condo-farm.com/wp-content/themes/DazChild/style.css%3Fver=4.8.7.css
The file name generated was:
style.css%3Fver=4.8.7.css and it allowed the website served using HTTP
server.
In wget2 the character is not replaced and the generated filename is
style.css\?ver\=4.8.7
This file can't be served using HTTP server as it strips the parameters from
the filename.
I suggest to strip the parameter string from the filename and save it as
"style.css".
More then that: if the file refers to static content (html,js,css...) I
suggest stripping the parameter string also in the referring links.
What do you think?
Michael
WordPress has 'invented' a way to avoid caching of static content and force
downloading it every time.
It does so by adding parameters to the file requested. This "feature" is
slowing the page download and create an issue using wget.
For example, a stylesheet is appended with "ver" parameter.
https://condo-farm.com/wp-content/themes/DazChild/style.css?ver=4.8.7
In wget1 the '?' character was replaced with %3F string (Hex value on the
character?) and it worked somehow.
https://condo-farm.com/wp-content/themes/DazChild/style.css%3Fver=4.8.7.css
The file name generated was:
style.css%3Fver=4.8.7.css and it allowed the website served using HTTP
server.
In wget2 the character is not replaced and the generated filename is
style.css\?ver\=4.8.7
This file can't be served using HTTP server as it strips the parameters from
the filename.
I suggest to strip the parameter string from the filename and save it as
"style.css".
More then that: if the file refers to static content (html,js,css...) I
suggest stripping the parameter string also in the referring links.
What do you think?
Michael