Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8179755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T00:04:09+00:00 2026-06-07T00:04:09+00:00

I have this form: <%= form_tag posts_path, :method => :get, :class => search_nav do

  • 0

I have this form:

<%= form_tag posts_path, :method => :get, :class => "search_nav" do %>
    <%= text_field_tag :search, params[:search], :class => "input-long search-query", :placeholder => "#{t('.search_nav')}"  %>
     <%= hidden_field_tag('ip', "#{request.ip}") %>
     <%= hidden_field_tag('city', "#{request.location.city}") %>
     <%= hidden_field_tag('country', "#{request.location.country}") %>
     <%= content_tag(:div, "",:class => "icon-search") %>
<% end %>

I get a url something like:

http://localhost:3000/en/posts?utf8=%E2%9C%93&search=check+params&ip=127.0.0.1&city=&country=Reserved

My question is:

Can I hide or encrypt the url params ip, city and country?

I can not use POST because I have paginate results:

<a rel="2" href="/en/posts?city=&country=Reserved&ip=127.0.0.1&page=2&search=check+params&utf8=%E2%9C%93">2</a> 
<a rel="3" href="/en/posts?city=&country=Reserved&ip=127.0.0.1&page=3&search=check+params&utf8=%E2%9C%93">3/a> 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T00:04:10+00:00Added an answer on June 7, 2026 at 12:04 am

    Encrypting URL parameters is pretty pointless. Why don’t you want the user to see these values? Sure you COULD encrypt them before adding them to the form, but is that really necessary?

    Furthermore, and perhaps more importantly, if these values are based on the request, then there is a good chance you don’t need to submit them in the first place. #{request.xxx} is going to be the same on the result page as is on the form page. Is there any good reason to pass these along? By submitting these as GET parameters, you’re actually sending redundant information to the server. Ruby/Rails is already going to calculate these values based off of the IP address automatically when the next page is loaded.

    The problem here isn’t with the form, but rather with the logic you’ve applied to designing it. I think you may have over-analysed your situation, and need to take a step back and re-think the problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have this as a search: <%= form_tag users_path, :controller => 'users', :action
I have this form: <input type=checkbox value=First />First <input type=checkbox value=Second />Second <input type=checkbox
I have this form which allows the input of any product quantity from 1-10:
I have this form:- <form action=> <table border=0> <td colspan=2 class=instruction>Select your desired option
I am trying to get this form to submit correctly. Here's what I have
I have this form tag below where the form submits to itself which I
I have this form. Basically what I want is to send a auto-response with
I have this form submit code: Event.observe(window, 'load', init, false); function init() { Event.observe('addressForm',
I have this form for inputting the birthday in html. But I only have
I have this form right here, where the user will add the start date

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.