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 8273841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:34:58+00:00 2026-06-08T07:34:58+00:00

Like a lot of you guys know that the javascript functions or methods can

  • 0

Like a lot of you guys know that the javascript functions or methods can be ran through browser adress bar. I want to prevent that happening by what kind of concept i should use where user may NOT know what has to go into my functions arguments when it has ran in the adress bar and would NOT work!?

I wanna use a concept just like twitter-follow-button. But if people know specific things(id,date etc) they can hack it thru gaining more followers and stuff. i only want it to be running when it gets clicked.

Using Programs: PHP, jquery, css
so the examples can be based on the followings above.

any help appriciated.
thanks in advance.

  • 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-08T07:34:59+00:00Added an answer on June 8, 2026 at 7:34 am

    javascript functions or methods can be ran through browser adress bar. I want to prevent that happening

    You can’t.

    I want to prevent that happening by what kind of concept i should use where user may NOT know what has to go into my functions arguments when it has ran in the adress bar and would NOT work!?

    You can obfuscate code, but that won’t prevent it being reverse engineered or simply rewritten. It is the HTTP requests that matter, not the JS that makes them.

    I wanna use a concept just like twitter-follow-button. But if people know specific things(id,date etc) they can hack it thru gaining more followers and stuff.

    You need to, on the server, authenticate that the user making the request is allowed to make the request. In that particular instance you can do it by using the session data for the currently logged in user to determine which user becomes the follower.

    You should also implement CSRF protection so that another site can’t forward users to your site.

    You can’t trivially stop Malory from giving Alice some JavaScript to put in the address bar which will make the requests. That’s a social engineering attack. Browsers are implementing protection against it now though (e.g. blocking javascript: uris from the address bar and making people use the developer tools instead).

    You can implement rate limiting so that a script can’t make a user follow 10s of people in a short period of time.

    You could have the request be one that requires a full page request to a different subdomain, and have that subdomain pull up a conformation request back to the original server. Since the user has to interact with data from two host names, a single pasted script won’t be able to go through the full process (since the same origin policy exists). That is probably overkill though.

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

Sidebar

Related Questions

First of all, I want you to know that I really like OpenCV. I
I like vectors a lot. They're nifty and fast. But I know this thing
I've noticed a lot about jobs being posted that require the applicant to know
Would like to know from all you guys what do you think about my
I was wondering if you guys know of any software that allows me to
It seems like a lot of people here and on many programmer wikis/blogs/ect. elsewhere
So it seems like a lot of people are playing the blame game around
Okay guess this question looks a lot like: What is the best way to
An export of the Eclipse preferences looks a lot like a Properties file. Is
I'm trying to re-use a Java generic collection I wrote, looks a lot like

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.