Problem: in the lower version of Android phones, the use of window.location.txt jump is invalid
solution 1:
Analysis: add a time stamp after the jump link. Considering that the cache problem may exist in the low version, we add a dynamic parameter time stamp after the jump link to refresh the cache data
// Add a timestamp after the jump link, because considering that it is a low version there may be caching problems so use the dynamic parameter timestamp after the jump link to refresh the cached data
window.location.href = url+'?time='+((new Date()).getTime());
solution 2:
Analysis: after using the above method, there will still be some problems with the jump of some models. Another method is tried to change the jump mode into asynchronous mode, and use a delayer to simulate (it is recommended that the time should be less than 300ms, otherwise users will be able to perceive some of the phenomenon of stuck)
// After using the above approach, there will still be some models have problems jumping, and tried another way to jump into an asynchronous way, using a time delay to simulate (recommended time less than 300ms, or the user will be able to perceive a slight lag phenomenon)
setTimeout(() => {
window.location.href = url+'?time='+((new Date()).getTime());
}, 300);
Read More:
- Android Studio: How to Solve APK error in mobile phone installation
- Android Phone Record Screen Error: failed to get surface
- [Solved] Android Studio Error:SDK location not found.
- How to Solve Android Error: gps requires ACCESS_FINE_LOCATION
- [Solved] the SDK location is inside Studio‘s install location
- [Solved] Windows Android Studio Cannot Start Error: Internal error. Please refer to https://code.google.com/p/android/issue
- [Solved] Phone Debug Program Error: The application could not be installed: INSTALL_FAILED_TEST_ONLY
- [Solved] Android Studio Start Error: Missing essential plugin: org.jetbrains.android Please reinstall Android
- [Solved] CMake Error: The current CMakeCache.txt directory is different than xxx
- NVM ERROR open \settings.txt: The system cannot find the file specified
- [Solved] Adb Shell Monkey Warning: can‘t create log.txt, Read-only file system
- [Solved] CMake Error at CMakeLists.txt:92 (add_subdirectory)
- [Solved] Android Error: import android.support.annotation.NonNull
- [Solved] Android 9.0 APP Install Android 4.4 Error: IllegalArgumentException
- [Solved] Android9.0 App Install Android4.4 Error: InflateException-You must supply a layout_height attribute.
- JZVideo Error: Attempt to invoke virtual method ‘android.view.Window android.app.Activity.getWindow()’ on a null object reference
- CMake Error: The source directory “opencv Install Catalog“ does not appear to contain CMakeLists.txt.
- Android Error: Android resource linking failed [How to Solve]
- Android uses the Android iconics font library error [How to Solve]