Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
54 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e6e6f5e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems, from this patche is not working grab, imho ... could you confirm it, pls ?
Control with RC is grabed once, but this is all. Refresh button works not too.
e6e6f5e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems, problem is in openwebif-1.2.3.min.js
Replaced with renamed old then works
e6e6f5e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have found the root cause ->
1b697fc
Please ask Mike Looijmans.
e6e6f5e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw, why are both changed .js (2.4, 1.2.3) in this "readable" format ?
e6e6f5e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Faster Loading .. Lower Size. 53KB -> 36KB
e6e6f5e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm ... very easy comparing changes in then ...
e6e6f5e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uhm, has grab been fixed now or not yet?
e6e6f5e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jbleyel I have debugged this issue. It is NOT caused by the change made by MiLo. JS debugging shows that both the auto-refresh and the refresh button no longer issue a GET request for a new image, so it is definitely a client-side issue.
e6e6f5e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found a solution, commit is on the way.
e6e6f5e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jbleyel Fix doesn't work with browsers that utilize a separate image cache, like Firefox. When it sees the src isn't changed, it doesn't even bother to check the HTTP cache, and therefore HTTP headers to control caching is useless.
Since we don't have the original js source, but only the minified version, could you revert the change, and put the timestamp back in the URL for the refresh of the grab? But instead of using a GET variable, use the timestamp as an anchor (so "/grab#20170512180712" instead of something like "/grab?ts=20170512180712")?
The image cache seems to be indexed on the full URL, so this will invalidate the image in the image cache, while not interfering with the HTTP cache, for which the anchor value is ignored.
e6e6f5e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will do it so. Back to old school. Should i also revert grab.py?
e6e6f5e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I send an PR #599 , with anchor just like @WanWizard suggested.
e6e6f5e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @athoik : could you please fix the mobile/screenshot.tmpl too. Please test it before pull.
I will make the openwebif.min.js.
e6e6f5e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, do NOT revert.
The old code used a GET variable for the timestamp, which, as MiLo wrote, polutes the browser cache with all the one-time images. Instead of using a GET variable, use an anchor.
So not:
http://192.168.1.2/grab?format=jpg&mode=all&ts=20170512205510
but
http://192.168.1.2/grab?format=jpg&mode=all#20170512205510
grab.py is 100% ok.
@athoik thanks, exactly as I intended. ;-)
e6e6f5e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Second part for mobiles is ready too: #600