/    Sign up×
Community /Pin to ProfileBookmark

View source ( declined )

How can you actualy stop someone from viewing your source code

i have a page i would like to block the source code its something people will

want to cut and paste – i want it be unique to the website

ie < you are not permitted to view this information > or the website declined

to show this infornation

ive read it cant actualy be done

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@MarPloJul 24.2012 — Hi,

From what I know, reading the source code of the page is a functionality of the browser. A code in the page cannot block this functionality.
Copy linkTweet thisAlerts:
@cootheadJul 24.2012 — Hi there jase,
[color=navy]How can you actually stop someone from viewing your source code[/color][/quote]
If you have to ask this question, then you may rest assured that there is

[b]absolutely[/b] no code in your website that anyone will want to use. :rolleyes:

You are just experiencing a mild attack of paranoia.

Certain mind bending drugs may produce this state as a side effect.

[i]coothead[/i]
Copy linkTweet thisAlerts:
@JMRKERJul 24.2012 — How can you actualy stop someone from viewing your source code

...

ive read it cant actualy be done[/QUOTE]


You read correctly even if you cannot capitalize or punctuate. :rolleyes:
Copy linkTweet thisAlerts:
@captainscallJul 24.2012 — Not that I know of -- but I do know that server-side code doesn't get rendered in the browser source code...directly

like PHP, ASP and the others.

e.g.

[CODE]<?php //you will never see me in 'view source'!!! ?>[/CODE]

but with
[CODE]<?php print "<p>hello</p>"; ?>[/CODE]

this will indeed be in the source:
[CODE]<p>hello</p>[/CODE]
Copy linkTweet thisAlerts:
@rnd_meJul 24.2012 — just make the code ugly (obfuscated+minimized), and it won't get stolen. to prevent someone from simply pasting the garbled mess, you can hide something in the code that checks to make sure what site the script is running from.

while technically you cannot hide client code, you practically can in the world of dumb and lazy coders who want quick cut-and-paste solutions.
×

Success!

Help @jase spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.26,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...