How to detect an Operating System [duplicate] - html

This question already has answers here:
Cross Browser Flash Detection in Javascript
(16 answers)
Closed 9 years ago.
I am in the process of trying to rewrite my website, and I have limited experience in HTML/CSS/Javascript. It is a photography website using galleries. I am wanting to make the default view to be using Flash, but I know that iPad/iPhone etc do not support Flash. I am looking for a way to determine what the OS is so I can direct the iWhatevers (and others if there are any), to a purely HTML site, and the non-iWhatevers to the Flash site.
I presume it would be done in the Heading part of the HTML, but what script would I use to do this?
Thank you in advance...

That sounds like a lot of extra work to create to maintain a Flash and a regular HTML site when a properly done HTML5 site can kill all the browsers with one stone. Consider a CMS like WordPress if you are not comfortable with a lot of coding.
However, if you want to go the route you mentioned, this thread will show you how: Detect if device is iOS

Related

Is it possible to share a website without hosting it? [duplicate]

This question already has answers here:
Is there anyway to render a website and share it without hosting it?
(2 answers)
Closed 1 year ago.
So recently I started a project to expand my knowledge when it comes to HTML and CSS. I made a little website just for myself and I want to get some feedback from my friend.
I want him to be able to maybe click on a link and then get to my website (doesn't have to be a link). So I don't want to publish the website for anyone but for my friend or anyone that has that link or something like that.
I already heard about sharing files to someone on OneDrive and including all the code in it but my OneDrive is already out of storage so something different would be nice.
It is best to use pages.github.com check the page is a small post and video tutorial on how to use it, greetings bro!

how to toggle between a multiple English and Arabic in my website? [duplicate]

This question already has answers here:
How to make a Multilanguage website [closed]
(3 answers)
Closed 2 years ago.
I'm a junior front-end developer based in Egypt, so most of what I work on will be in Arabic but I will also need to support English since it is the standard website language used.
I'm looking for a solution to help my clients toggle between multiple languages. Should I build an entire project twice or what is their a better solution to switch languages on a wbeite?
Please keep in mind that I'm still a junior developer with just 2 years of experience.
You can declare the language of websites in the <html> tag, e.g. <html lang="en">. Therefore, you should be able to save your original website/project in one language and then save another copy of your website/project with the other language you'd like to show.
Read more about declaring languages in HTML
If you want to do all of this on one page only, you can use JavaScript to change the page's language using an onclick function. MDN has a good tutorial using onclick here. However, this is more complicated since you'll need to use a dictionary, such as Google's Cloud Translation API.

How to let robots parse our custom html elements? [duplicate]

This question already has answers here:
How do search engines deal with AngularJS applications?
(15 answers)
Closed 6 years ago.
I have a website containing custom elements (i use angular 2), and google fails to parse them correctly :
It only sees
<my-app></my-app>
It seems that the value of this component is not retrieved at all by google robots.
Is there a best practice / workaround ?
Thanks for your help.
This has been asked a million times. Please refer to this question and this specific page by google.
Times have changed. Today, as long as you're not blocking Googlebot from crawling your JavaScript or CSS files, we are generally able to render and understand your web pages like modern browsers. To reflect this improvement, we recently updated our technical Webmaster Guidelines to recommend against disallowing Googlebot from crawling your site's CSS or JS files.
What you can do is getting the HTML of your rendered page and inserting it into the <my-app></my-app> tags without user information or the like.
This will get replaced anyway after Angular has booted up, this means you can even put something completely different in there.

How to embed PDF in a web page without javascript [duplicate]

This question already has answers here:
Recommended way to embed PDF in HTML?
(30 answers)
Closed 9 years ago.
I want to show pdfs in certain pages on my site. I've experimented with google's viewer api and it works great but I dont want to depend on a third party api call. I also want it to be as robust and reliable as possible, so I'm trying to avoid javascript. I see some indication that it can be done with just HTML using either or tags, but there appears to be disagreement as to the browser support: Recommended way to embed PDF in HTML?
Is there a definitive way to do this?
I need to support IE8+ and the site will be responsive, so the solution has to be able to accommodate smaller screen sizes.
Attention duplicate police: The entire basis for this question is to figure out what is specifically NOT answered in the other question. I even linked to that question in my ow
If you don't want to use JavaScript -- no, there is not.
Even if there is a good enough solution for some OS with something like Acrobat Reader installed (maybe you get lucky with Windows), all the other OSes still don't support it.
So, if you want your site to be seen more or less the same way by everybody, you'll have to go with Javascript base things and their not so robust and reliable support -- they are pretty portable, that's a great thing on the web.
Related:
Open Source Javascript PDF viewer
Why Use a Javascript PDF Viewer

How to prevent users from downloading Presentation ( PPT ) and videos from my HTML page [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to prevent downloading images and video files from my website?
I have an HTML page which resides locally on my machine. I have 2 items on every page 1 - PPT presentation 2 - Video tutorial . I want to prevent users from downloading the content for their personal use. How can this be achieved?
Thanks in Advance !
Maddy
Unfortunately the short answer is that it cannot not be done in a good way, if the content should be available at your website at the same time.
There are solutions where you obfuscate the path to the file when it is sent to the browser, and then use a JavaScript to "decrypt" the path at the client. But those solutions are in no way bullet proof, as the decryption technique would have to be sent to the client as well.
This one is not easy to do, especially if you show them on your page already. As you do so they'll get downloaded on the browser an there's no way, at least i'm aware of you could do this with ease!
All you can do is to make it harder... but it still always be possibile! Even if you could stop them from downloading the file, you can't stop them from hooking a VCR to their video card and re-recording it. Even if you use some protected-path technology to stop that, you can't stop them from pointing a camcorder at the screen.
Same applies to the ppt presentations... as they can view them... users could take screenshots or do whatever to create their own copy!