Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I'm creating a web based application and I got a JS library containing all my JS functions. If I try to open the library via browser I can see the source code. Is there a way to obfuscate it or deny the access to the file to users?
No, AFAIK there isn't, because the server cannot see whether the browser requests the JS file to execute it or to display its source code to the user. The only thing you can do is to minify your JS file; the browser will still execute it, but for the user it's hard to read it. But it's not hard for anyone to un-minify / tidy it.
EDIT: If you have access to the server, you can configure it to compress your JS file before sending it to the browser - The browser decompresses it for execution. I don't know though if the browser will decompress it too, when the file is viewed directly. If he would, it wouldn't make any sense to compress it (except for slightly faster load times).
You can minify and obfuscate but you cannot deny access to the file because the browser will load it along with your webpage.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
So I made a website and I have all the html, css, and js files in a folder. I can open the file in chrome, but I was wondering if there was a way to open and view html files without using a browser, maybe like an app that acts as a browser but is offline and only opens .html files.
One use case is opening files on a high performance computing cluster with no internet access and no browsers installed. Using secure copy to bring very large .html files onto a personal computer for hundreds of samples would be very time consuming and require manual input. A way to view text and images of an .html file without a browser would be very useful if it exists.
Thank you!
HTML is made for browsers. You can't run scripts made for browsers without a browser.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Whenever a researcher submits his paper to a journal website he/she does so by uploading a latex file plus some figures in the format of eps, and after clicking on the submit button the files are converted to one pdf file. Does anyone know how they do that?
Is there a .js file that does that and is pdf.js capable of doing this?
i imagine it's done server-side (after the files have been transmitted to the server) using typical latex-to-pdf workflow tools (e.g., the pdflatex command or similar). i imagine it's theoretically possible to write a javascript library to do it client-side in the browser though i haven't come across anything like that.
Edit: cool! as posted in Jaromanda X's comment above, there is in fact a JavaScript library for this. shows what i know. :p
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I want to make it really simple.
I place in an image in the folder, then, it will automatically be added in the gallery as I hit refresh.
I'm not quite sure if this is possible in javascript/jquery.
edit: a plug-in would suffice neatly.
Right now there is a new feature in html5 upcoming but it's not quiet well supported yet by browsers:
See this article:
http://www.html5rocks.com/en/tutorials/file/dndfiles/
If you only want to show your page in InternetExplorer you can access the FileSystemObject
var fso = new ActiveXObject("Scripting.FileSystemObject");
(A feature that was available in Firefox for this purpose was removed entirely since version 17 ..)
In general every way to access the file system via JavaScript out of the WebBrowser is illegal by definition (no matter if certain technologies give you the possibility somehow) because it's intended to run sandboxed. So don't expect to find a simple solution to that ...
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
There is a website which contains information we have paid for access to, however the only way available to access the information is through the website and there are 1400 records. So, since there is so much of it, we want to have the information in an excel spreadsheet which is manageable. However, the organization in charge of the website isn't willing to help.
I can write a python script that can parse the html and extract the relevant data, however, the problem is that the site is not easily crawlable because it is an ASP site and many of the "links" are in fact triggers to javascript which loads the destination page. This means that a tool like HTTrack doesn't really work.
Are there any other tools or python modules which can help me do this (bearing in mind the "javascript" links)? I'm totally new to this kind of thing, so I just have no experience of what kinds of things are available to me.
Jython + HtmlUnit may be very usefull in your task.
You can use Scrapy, which is a framework for scraping websites.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
Have a bunch of pdf files I want to display on a web page (like google books). I do not want them to be possible to download, or at least hinder it.
Are there any open soruce solutions? HTML5, Javascript?
try:
https://github.com/mozilla/pdf.js
or:
http://trapeze.xyrka.com/
Here is a pdf viewer in javascript and html called pdf.js. However, in order for the pdf to get to the browser, it will still need to be downloaded.
There is no way to display something in a browser without downloading it. It may take a bit of work to find the original asset (looking through the network tab in chrome dev tools) but the original pdf will still be downloaded.