Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 149055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T09:04:05+00:00 2026-05-11T09:04:05+00:00

I am currently using the meta http-equiv=’Refresh’ to automatic start PDF downloads. however this

  • 0

I am currently using the meta http-equiv=’Refresh’ to automatic start PDF downloads. however this has different effect on each of the browsers.

The main problem is with IE (6 & 7) once the user is redirected to the PDF if the user click the back button they are sent back to the page that initiated the download and then promptly redirect to the PDF again.

Firefox on windows has a better affect but still not perfect the user gets to the download page and is redirected to the PDF. However if they use the back button the completely miss the download page.

Currently Firefox on Linux has the exact effect i want. Being that the download page redirects you to the PDF and the back button from the PDF sends you back to the download page and there you stay.

I have tried using the javascript setTimeout() function to delay a pop-up of the PDF however the delay does not seem to work in any browser and the pop-up does not seem to work in IE7.

Has anyone implemented an elegant solution to the problem that i could use?

Thanks in advance for you help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T09:04:06+00:00Added an answer on May 11, 2026 at 9:04 am

    Referrer

    You could check the referrer:

    if (document.referrer != 'http://homepage.com/file.pdf') {     // go to the file } 

    It’s a little bit more complex because you have to compare to the absolute URL of the referrer, but this shouldn’t be a problem.

    Cookies

    You could set a cookie the first time you enter the download page. If the cookie is set (for every file another entry in the cookie) then you shouldn’t redirect.

    A disadvantage is that if someone reloads the page (because he wants to see the file a second time) he can’t access the file anymore. There are some possibilities around it:

    • Set a timestamp which expires in the cookie.
    • Add a link to the page which the user can click manually.

    Setting/Getting a cookie:

    if (document.cookie && document.cookie == 'I was here!') {     alert(document.cookie); } else { // set a cookie     document.cookie = 'I was here!'; } 

    Javascript can redirect like this:

    window.location.href = 'http://www.google.com'; 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently using DPack as this adds a Collapse All Projects option to the
I'm currently developing a webtool for a game called 'Eve Online'. This game has
I am currently using this script to get new data every second from record_count.php
i'm working on a website and currently using the @font-face tehnique ( this +
I've been through the forum and tried this post (http://stackoverflow.com/questions/7128417/stop-javascript-auto-refresh-after-fix-time-for-example-1-min). I'm busy with a
Currently using System.Web.UI.WebControls.FileUpload wrapped in our own control. We have licenses for Telerik. I
Currently using the HTTPServletRequest class and specifically the .getQueryString method to retrieve an inputted
Currently using Google Analytics as a supplement to our paid tracking software, but neither
Im currently using vs2008 with asp.net mvc framework for web development. Im missing a
I'm currently using VS2005 Profesional and .NET 2.0, and since our project is rather

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.