Hi I am Mohammad Fazle Rabbi a new blogger. I am always try to make some unique design on my blog but every time others are copying my design by viewing blog source code through Firefox. So is there any way to disable source code in Firefox browser only. Because by this visitors can easily can see any selected section code. If anyone know kindly reply me. I will be grateful to you.

Best Regards

Mohammad Fazle Rabbi

Recommended Answers

All 9 Replies

I don't think there is any way of stopping people from looking at your source code. Any specific reason you're looking for a solution for firefox? Chrome can also look at specific places in the page using the Left click → Inspect element option, as can Internet Explorer and various other browsers using Ctrl + U. Of course, you could disable the Chrome feature of looking at a specific location by disabling the mouse left click with javascript, but using keyboard shortcuts or developer tools may still show the user any code in your website (as long as it's not server scripted)

Anything which is handled client side, this being HTML, CSS and JavaScript are needed to be sent to the viewers computer so that it can be interpreted by the browser. This means that it shall always be viewable by other people unless you enforce some sort of encryption or code obfuscation.

Member Avatar for stbuchok

The only thing you can do is obfuscate the code so that it is harder to read.

it is not possible to disable view source short cut for website but you can use dynamic css desing for comlexity so most of the people can't read your css directly but you should know fire bug is still here

thanks Arti..But I am using Google Blogger platform. And I use xml for template design where only work CSS, Javascript so do you know exact coding for that..

No matter what you try to implement, your HTML is accessible. It has to be, that's how browsers display the data. Even if you disable right click contexts, there are many other programs and ways to access the HTML that is downloaded from the web server.

Your best bet is to obfuscate and compress your markup so its very difficult to read and it discourages anyone from trying to simply copy and paste your code.

do you know exact coding for that

There is no exact coding for that. It depends on you and your ability to make your code unreadable to others. Perhaps creating your "readable content" just for you and for future reference and "minimizing" your code (i.e. jquery and css libraries .min files) so that it is hard to keep track on which element is what

you can apply css using jquery so it can be more complex to read and understand for new programmer

Member Avatar for diafol

I think that trying to obfuscate your front end code and markup is pointless. Unfortunately, you'll find people copying your work no matter what you try to do. Even if they construct a css of their own to mimic yours. You can place a copyright notice in your work (each css, js and html file) and refer to all original graphics as copyright too. If you find clones of your work online, then you could chase them down and ask them to remove their copyright-infringing files.

But if a copier is that lazy to take your files wholesale without modification, they will be just as happy to take your obfuscated files and use them too.
Obfuscation may deter the true noobs though. It wouldn't deter me if I was looking for a quick fix (not that I am!)

Remember just because code and markup is visible, doesn't mean that anybody can people are allowed to steal it. You are protected (to an extent). Find them and pursue them. They'll probably poo themselves when confronted with a takedown order.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.