html - Encrypting src attribute of iframe control -


this question has answer here:

i using iframe load pdf file temporary location , looks shown below

<iframe id="mypdf" width="100%" height="100%" src="config\temp\tmp_report_0.pdf"></iframe> 

this load pdf file browser window, inside iframe. question how can hide 'src' value being visible user when right click , select 'view source' browser.

the intention here enrcypt/hide 'src' value users. suggestions?

you can use generic handler hide file location.

inside handler serve file base on url parameter. here basic example:

 <iframe id="mypdf" width="100%" height="100%" src="openreport.ashx?reportid=2129938212"></iframe> 

now can/must encrypt url parameter avoid download reports.

an example of handler download file : asp.net file download server

from remove line contains attachment; filename= file load on inside of iframe. of course can find many other examples.


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -