Title: Java only on form pages
Last modified: January 29, 2026

---

# Java only on form pages

 *  Resolved [wpapm](https://wordpress.org/support/users/wpapm/)
 * (@wpapm)
 * [4 months, 1 week ago](https://wordpress.org/support/topic/java-only-on-form-pages/)
 * Hi,
 * How can I ensure that
 *     ```wp-block-code
       .../wp-content/plugins/contact-form-7-honeypot/includes/apps/cf7-redirection/assets/js/app.js?ver=3.4.0-1.0.0
       ```
   
 *  is not included on every page, but only on the contact pages?

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Support [fahadwaheed](https://wordpress.org/support/users/fahadwaheed/)
 * (@fahadwaheed)
 * [4 months, 1 week ago](https://wordpress.org/support/topic/java-only-on-form-pages/#post-18803638)
 * Hi [@wpapm](https://wordpress.org/support/users/wpapm/)
 * I hope you are doing well.
 * Thank you for contacting the CF7 Apps Support Team. We are happy to assist you.
 * To help us better understand the issue and provide accurate guidance, we kindly
   request that you share screenshots (highlighted if possible) or a screen recording
   showing the complete issue.
 * This information will enable us to investigate the matter thoroughly and assist
   you more effectively.
 * We look forward to your response.
 *  Thread Starter [wpapm](https://wordpress.org/support/users/wpapm/)
 * (@wpapm)
 * [4 months ago](https://wordpress.org/support/topic/java-only-on-form-pages/#post-18806822)
 * Hello and thank you for the feedback.
 * On my website, which is currently being developed locally using Local WP, there
   are three pages that integrate the CF7 contact form.
 * On these contact pages, the redirect function of your plugin is also used to 
   redirect users after the form is submitted.
 * However, due to the use of your plugin, the following is visible in the source
   code of all pages:
 *     ```wp-block-code
       <script id="cf7apps-redirection-js-extra">var cf7appsRedirection = {"ajaxurl":"http://test.local/wp-admin/admin-ajax.php"};//# sourceURL=cf7apps-redirection-js-extra</script><script src="http://test.local/wp-content/plugins/contact-form-7-honeypot/includes/apps/cf7-redirection/assets/js/app.js?ver=3.4.0-1.0.0" id="cf7apps-redirection-js"></script>
       ```
   
 * The code would probably only be really needed on the contact pages 😉
 * Therefore, it would be nice if the code could simply be included on specific 
   page IDs or via the template name. Perhaps this could be done by adding an entry
   to the theme’s functions.php file?
 * If not… no problem. I just noticed that there’s code on pages where it’s not 
   strictly necessary. Thanks for the plugin, too! Best regards
 *  Plugin Support [fahadwaheed](https://wordpress.org/support/users/fahadwaheed/)
 * (@fahadwaheed)
 * [4 months ago](https://wordpress.org/support/topic/java-only-on-form-pages/#post-18811116)
 * Hi [@wpapm](https://wordpress.org/support/users/wpapm/)
 * The redirect script is only needed on pages that have a Contact Form 7 form. 
   By default, we load it on all pages to make sure redirects always work, because
   there’s no fully reliable way to detect CF7 forms on every page, especially when
   forms are added via shortcodes, page builders, widgets, or dynamic content.
 * The script is very lightweight and only runs when a form is submitted, so it 
   won’t affect other pages.
 *  Thread Starter [wpapm](https://wordpress.org/support/users/wpapm/)
 * (@wpapm)
 * [4 months ago](https://wordpress.org/support/topic/java-only-on-form-pages/#post-18813837)
 * Hi [@fahadwaheed](https://wordpress.org/support/users/fahadwaheed/)
 * Thank you for the clear answer.

Viewing 4 replies - 1 through 4 (of 4 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fjava-only-on-form-pages%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/contact-form-7-honeypot/assets/icon-256x256.png?rev=3328723)
 * [CF7 Apps – Honeypot, Database, Redirection, Webhook, and Addons for Contact Form 7](https://wordpress.org/plugins/contact-form-7-honeypot/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7-honeypot/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7-honeypot/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7-honeypot/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7-honeypot/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7-honeypot/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [wpapm](https://wordpress.org/support/users/wpapm/)
 * Last activity: [4 months ago](https://wordpress.org/support/topic/java-only-on-form-pages/#post-18813837)
 * Status: resolved