Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move is_robot function to javascript #266

Merged
merged 2 commits into from
Jun 5, 2018

Conversation

david-binda
Copy link
Contributor

The Liveblog is currently reyling on an existence of vary_cache_on_function function when modifying the behaviour for bots.

As not all environments taking advantage of page level caching have the posibility of varying page cache on user agent, the check should happen in browser.

This commit it moving the logic to inside the js/liveblog-lazyloader.js taking advantage of the same regex and disabling the lazyloading initialisation for robots + hiding the load more button.

Fixes #264

The Liveblog is currently reyling on an existence of `vary_cache_on_function` function when modifying the behaviour for bots.

As not all environments taking advantage of page level caching have the posibility of varying page cache on user agent, the check should happen in browser.

This commit it moving the logic to inside the js/liveblog-lazyloader.js taking advantage of the same regex and disabling the lazyloading initialisation for robots + hiding the load more button.
sboisvert
sboisvert previously approved these changes Jan 15, 2018
@philipjohn
Copy link
Contributor

With the new React frontend I'm wondering whether we actually need this at all?

philipjohn
philipjohn previously approved these changes Jun 5, 2018
@philipjohn philipjohn dismissed stale reviews from sboisvert, ghost , and themself via de1ddcf June 5, 2018 19:26
@philipjohn philipjohn merged commit de1ddcf into master Jun 5, 2018
@GaryJones GaryJones deleted the fix-264-remove-vary-cache-on-function branch June 7, 2024 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants