Fixed implementation of the speed test and improved screen quality detection#8
Open
Seneral wants to merge 6 commits intoteleject:masterfrom
Open
Fixed implementation of the speed test and improved screen quality detection#8Seneral wants to merge 6 commits intoteleject:masterfrom
Seneral wants to merge 6 commits intoteleject:masterfrom
Conversation
… unexpected behaviour
Replaced zoom level as decision between image quality with actual resolution (SubHD, HD and Retina)
- SpeedTest is now performed globally by setting the complete event globally on $(document) - SpeedTest can now actually explicitly be started before loading the DOM and explicitly ommitted in all other calls by setting the speedTestUri - all calls to hiSrc now use existing SpeedTest results or subscribe to the completed event to wait with their execution
- Added optional 'SecondChance' test performs the SpeedTest once more when failed on HD-capable devices - Enable by setting secondChance parameter to true - Goal is to eliminate wrong bandwidth detection on desktop PCs due to bandwidth fluctuation; - This will not affect mobile networks or devices not needing this - It is only happening once at maximum during one cache expiration period
Seneral
pushed a commit
to Seneral/seneral.github.io
that referenced
this pull request
Feb 5, 2017
(and added 3rd party source scripts) Improved screen quality detection: - Replaced zoom level as decision between image quality with actual resolution (SubHD, HD and Retina differenciation) - Calculation of screen quality is now local and possibly different for each call to HiSrc allowing for different types of image loading - Added parameters minHDSize (1080) and minRetinaSize (2560) Fixed implementation of the speed test: - SpeedTest is now performed globally by setting the complete event globally on $(document) - SpeedTest can now actually explicitly be started before loading the DOM and explicitly ommitted in all other calls by setting the speedTestUri (if empty, no speed check is performed) - all calls to HiSrc now use existing SpeedTest results or subscribe to the completed event to wait with their execution Implemented second chance test: - Added optional 'SecondChance' test performs the SpeedTest once more when failed on HD-capable devices - Added parameter secondChance (false) to toggle this behaviour - Goal is to eliminate wrong bandwidth detection on desktop PCs due to bandwidth fluctuations - This will not affect mobile networks or devices not needing this - It is only happening once at maximum during one cache expiration period Other: - Removed writing of fixed width and height values on images to prevent unexpected behaviour (said to fix some odd behaviour on Safari)
Seneral
added a commit
to Seneral/seneral.github.io
that referenced
this pull request
Sep 21, 2021
(and added 3rd party source scripts) Improved screen quality detection: - Replaced zoom level as decision between image quality with actual resolution (SubHD, HD and Retina differenciation) - Calculation of screen quality is now local and possibly different for each call to HiSrc allowing for different types of image loading - Added parameters minHDSize (1080) and minRetinaSize (2560) Fixed implementation of the speed test: - SpeedTest is now performed globally by setting the complete event globally on $(document) - SpeedTest can now actually explicitly be started before loading the DOM and explicitly ommitted in all other calls by setting the speedTestUri (if empty, no speed check is performed) - all calls to HiSrc now use existing SpeedTest results or subscribe to the completed event to wait with their execution Implemented second chance test: - Added optional 'SecondChance' test performs the SpeedTest once more when failed on HD-capable devices - Added parameter secondChance (false) to toggle this behaviour - Goal is to eliminate wrong bandwidth detection on desktop PCs due to bandwidth fluctuations - This will not affect mobile networks or devices not needing this - It is only happening once at maximum during one cache expiration period Other: - Removed writing of fixed width and height values on images to prevent unexpected behaviour (said to fix some odd behaviour on Safari)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improved screen quality detection:
Fixed implementation of the speed test:
Implemented second chance test:
Other:
Example of usage that was previously impossible: